mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-15 01:17:45 +00:00
ffi.rs: silence warning about get_procs()
We should fix this warning eventually. Silence it for now to make Clippy pass without warnings, which makes it much more useful. Compiling fish-rust v0.1.0 (/home/johannes/git/fish-riir/fish-rust) error: mutable borrow from immutable input(s) --> src/ffi.rs:79:32 | 79 | pub fn get_procs(&self) -> &mut [UniquePtr<process_t>] { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: immutable borrow here --> src/ffi.rs:79:22 | 79 | pub fn get_procs(&self) -> &mut [UniquePtr<process_t>] { | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref = note: `#[deny(clippy::mut_from_ref)]` on by default error: could not compile `fish-rust` due to previous error
This commit is contained in:
parent
29a2c4b718
commit
958ad3a9e7
1 changed files with 1 additions and 0 deletions
|
@ -66,6 +66,7 @@ impl parser_t {
|
|||
}
|
||||
|
||||
impl job_t {
|
||||
#[allow(clippy::mut_from_ref)]
|
||||
pub fn get_procs(&self) -> &mut [UniquePtr<process_t>] {
|
||||
let ffi_procs = self.ffi_processes();
|
||||
unsafe { slice::from_raw_parts_mut(ffi_procs.procs, ffi_procs.count) }
|
||||
|
|
Loading…
Reference in a new issue