Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit 66e2977

Browse files
committed
json-sysctl: Oops, no need for pub mod error
1 parent 8f72275 commit 66e2977

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mod allocator;
99
pub mod bindings;
1010
mod c_types;
1111
pub mod chrdev;
12-
pub mod error;
12+
mod error;
1313
pub mod filesystem;
1414
pub mod printk;
1515
pub mod sysctl;

tests/json-sysctl/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use core::sync::atomic::{AtomicBool, Ordering};
88
use serde::Serialize;
99
use serde_json_core;
1010

11-
use linux_kernel_module::error;
1211
use linux_kernel_module::sysctl::Sysctl;
1312
use linux_kernel_module::Mode;
1413

@@ -37,8 +36,8 @@ impl linux_kernel_module::chrdev::FileOperations for JsonChrdev {
3736
c: C.load(Ordering::Relaxed),
3837
};
3938
let mut s =
40-
serde_json_core::to_vec::<typenum::U32, _>(&o).map_err(|_| error::Error::ENOMEM)?;
41-
s.push(b'\n').map_err(|_| error::Error::ENOMEM)?;
39+
serde_json_core::to_vec::<typenum::U32, _>(&o).map_err(|_| linux_kernel_module::Error::ENOMEM)?;
40+
s.push(b'\n').map_err(|_| linux_kernel_module::Error::ENOMEM)?;
4241
let start = min(offset.try_into()?, s.len());
4342
let end = min(start + buf.len(), s.len());
4443
buf.write(&s[start..end])?;

0 commit comments

Comments
 (0)