You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2025/06/06 08:41:11 UTC

(avro-rs) branch fix-build-with-nightly-06-06-2025 updated (10628e4 -> 6d81ad0)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a change to branch fix-build-with-nightly-06-06-2025
in repository https://gitbox.apache.org/repos/asf/avro-rs.git


 discard 10628e4  chore: Fix the build with latest nightly compiler (06.06.2025)
     add f8afce2  Update Cargo.lock
     new 6d81ad0  chore: Fix the build with latest nightly compiler (06.06.2025)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (10628e4)
            \
             N -- N -- N   refs/heads/fix-build-with-nightly-06-06-2025 (6d81ad0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Cargo.lock | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


(avro-rs) 01/01: chore: Fix the build with latest nightly compiler (06.06.2025)

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch fix-build-with-nightly-06-06-2025
in repository https://gitbox.apache.org/repos/asf/avro-rs.git

commit 6d81ad0ed9fb644dc59e6fdb391edb643f06baef
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Fri Jun 6 11:39:03 2025 +0300

    chore: Fix the build with latest nightly compiler (06.06.2025)
    
    Error:
    ```
    error: lifetime flowing from input to output with different syntax can be confusing
       --> avro/src/types.rs:238:24
        |
    238 |     pub fn new(schema: &Schema) -> Option<Record> {
        |                        ^^^^^^^            ------ the lifetime gets resolved as `'_`
        |                        |
        |                        this lifetime flows to the output
        |
        = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]`
    help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
        |
    238 |     pub fn new(schema: &Schema) -> Option<Record<'_>> {
        |                                                 ++++
    ```
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 avro/src/types.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/avro/src/types.rs b/avro/src/types.rs
index 4f7c40f..fe88bfe 100644
--- a/avro/src/types.rs
+++ b/avro/src/types.rs
@@ -235,7 +235,7 @@ impl Record<'_> {
     /// Create a `Record` given a `Schema`.
     ///
     /// If the `Schema` is not a `Schema::Record` variant, `None` will be returned.
-    pub fn new(schema: &Schema) -> Option<Record> {
+    pub fn new(schema: &Schema) -> Option<Record<'_>> {
         match *schema {
             Schema::Record(RecordSchema {
                 fields: ref schema_fields,