Skip to content

Instantly share code, notes, and snippets.

@sajattack
Created November 6, 2017 00:50
Show Gist options
  • Save sajattack/420aedf59bbc8ddc51221d01b65c4125 to your computer and use it in GitHub Desktop.
Save sajattack/420aedf59bbc8ddc51221d01b65c4125 to your computer and use it in GitHub Desktop.
let mut stb = syscall::Stat;
if syscall::call::fstat(*dirp.fd, &stb).unwrap() < 0 {
do_something();
}
/*| if syscall::call::fstat(*dirp.fd, &stb).unwrap() < 0 {
| ^^^^ types differ in mutability
|
= note: expected type `&mut syscall::Stat`
found type `&syscall::Stat`*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment