Skip to content

Commit

Permalink
style(err): format code
Browse files Browse the repository at this point in the history
  • Loading branch information
qevolg committed Dec 25, 2024
1 parent bcf4749 commit 8eed54b
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions taos-error/src/code/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,22 @@ impl PartialEq<i32> for Code {
}
}

#[test]
fn test_code() {
let c: i32 = Code::new(0).into();
assert_eq!(c, 0);
let c = Code::from(0).to_string();
assert_eq!(c, "0x0000");
dbg!(Code::from(0x200));

let c: i8 = Code::new(0).into();
let mut c: Code = c.into();

let _: &i32 = &c;
let _: &mut i32 = &mut c;
#[cfg(test)]
mod tests {
use super::Code;

#[test]
fn test_code() {
let c: i32 = Code::new(0).into();
assert_eq!(c, 0);
let c = Code::from(0).to_string();
assert_eq!(c, "0x0000");
dbg!(Code::from(0x200));

let c: i8 = Code::new(0).into();
let mut c: Code = c.into();

let _: &i32 = &c;
let _: &mut i32 = &mut c;
}
}

0 comments on commit 8eed54b

Please sign in to comment.