add unused_mut lint
This commit is contained in:
@@ -1,13 +1,7 @@
|
||||
use super::{BUFSIZ, Buffer, FILE, constants};
|
||||
use core::{cell::UnsafeCell, ptr};
|
||||
|
||||
use crate::{
|
||||
fs::File,
|
||||
header::pthread,
|
||||
io::LineWriter,
|
||||
platform::types::c_int,
|
||||
sync::{Mutex, Once},
|
||||
};
|
||||
use crate::{fs::File, header::pthread, io::LineWriter, platform::types::c_int, sync::Once};
|
||||
use alloc::{boxed::Box, vec::Vec};
|
||||
|
||||
// TODO: Change FILE to allow const fn initialization?
|
||||
@@ -17,7 +11,7 @@ impl GlobalFile {
|
||||
fn new(file: c_int, flags: c_int) -> Self {
|
||||
let file = File::new(file);
|
||||
let writer = Box::new(LineWriter::new(unsafe { file.get_ref() }));
|
||||
let mut mutex_attr = pthread::RlctMutexAttr {
|
||||
let mutex_attr = pthread::RlctMutexAttr {
|
||||
ty: pthread::PTHREAD_MUTEX_RECURSIVE,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ use crate::{
|
||||
error::Errno,
|
||||
fs::File,
|
||||
header::{
|
||||
errno::{self, EINVAL},
|
||||
errno::EINVAL,
|
||||
fcntl::{
|
||||
F_GETFL, F_SETFD, F_SETFL, FD_CLOEXEC, O_APPEND, O_CLOEXEC, O_CREAT, O_EXCL, O_RDONLY,
|
||||
O_RDWR, O_TRUNC, O_WRONLY, fcntl,
|
||||
@@ -17,11 +17,7 @@ use crate::{
|
||||
pthread,
|
||||
},
|
||||
io::BufWriter,
|
||||
platform::{
|
||||
self,
|
||||
types::{c_int, c_ulonglong},
|
||||
},
|
||||
sync::Mutex,
|
||||
platform::types::{c_int, c_ulonglong},
|
||||
};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
@@ -79,7 +75,7 @@ pub fn _fdopen(fd: c_int, mode: CStr) -> Result<Box<FILE>, Errno> {
|
||||
|
||||
let file = File::new(fd);
|
||||
let writer = Box::new(BufWriter::new(unsafe { file.get_ref() }));
|
||||
let mut mutex_attr = pthread::RlctMutexAttr {
|
||||
let mutex_attr = pthread::RlctMutexAttr {
|
||||
ty: pthread::PTHREAD_MUTEX_RECURSIVE,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user