Skip to content

Update rustc version from 1.88.0 to 1.89.0 ,get a compiling error at xargo v0.3.26 #350

@Lee-watashi

Description

@Lee-watashi

docs changed in 1.89.0
method.try_lock_shared

error[E0308]: mismatched typesc
   --> /home/XXXXX/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/xargo-0.3.26/src/flock.rs:118:41
    |
118 |                 acquire(msg, &path, &|| f.try_lock_shared(), &|| f.lock_shared())?;
    |                                         ^^^^^^^^^^^^^^^^^^^ expected `Result<(), Error>`, found `Result<(), TryLockError>`
    |
    = note: expected enum `std::result::Result<_, std::io::Error>`
               found enum `std::result::Result<_, std::fs::TryLockError>`
help: use `?` to coerce and return an appropriate `Err`, and wrap the resulting value in `Ok` so the expression remains of type `Result`
    |
118 |                 acquire(msg, &path, &|| Ok(f.try_lock_shared()?), &|| f.lock_shared())?;
    |                                         +++                   ++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `xargo` (lib) due to 1 previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions