fuser icon indicating copy to clipboard operation
fuser copied to clipboard

getattr compile error on hello.rs example

Open markg85 opened this issue 1 year ago • 1 comments

Hi,

My toml file:

[package]
name = "crazyfuse"
version = "0.1.0"
edition = "2021"

[dependencies]
clap = { version = "4.5.19", features = ["cargo"] }
env_logger = "0.11.5"
fuser = { version = "0.14.0", features = ["abi-7-31", "libfuse", "serializable"] }
libc = "0.2.159"
serde = "1.0.210"

on the hello.rs file gives this error:

error[E0050]: method `getattr` has 5 parameters but the declaration in trait `getattr` has 4
  --> src/main.rs:61:16
   |
61 | ...tr(&mut self, _req: &Request, ino: u64, _fh: Option<u64>, reply: ReplyAttr...
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 4 parameters, found 5
   |
   = note: `getattr` from trait: `fn(&mut Self, &fuser::Request<'_>, u64, ReplyAttr)`

This is with a clean build environment. Is there anything wrong in my toml file (could well be, i'm rather new to Rust) or am i hitting an actual bug here?

markg85 avatar Oct 05 '24 18:10 markg85

Ahh, i think i see. https://github.com/cberner/fuser/pull/279 was added late march of 2024, that's after the 0.14.0 release and i'm taking an example from 0.14.0.

markg85 avatar Oct 05 '24 18:10 markg85

This can be closed, I think.

We can see from https://github.com/cberner/fuser/pull/315 that all examples currently compile.

dannycjones avatar Nov 21 '24 13:11 dannycjones