Skip to content

Commit

Permalink
rust: error: Derive Error as Debug
Browse files Browse the repository at this point in the history
So that `Result::expect` can be used.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
  • Loading branch information
fbq committed May 12, 2021
1 parent fc2b177 commit 40a271a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rust/kernel/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use core::{num::TryFromIntError, str::Utf8Error};
///
/// The kernel defines a set of integer generic error codes based on C and
/// POSIX ones. These codes may have a more specific meaning in some contexts.
#[derive(Debug)]
pub struct Error(c_types::c_int);

impl Error {
Expand Down

0 comments on commit 40a271a

Please sign in to comment.