Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
roytang121 committed Feb 22, 2024
1 parent b3e4f97 commit 2be4c8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/v5/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1157,12 +1157,13 @@ pub struct BookUpdate<'a> {

#[cfg(test)]
mod test {
use crate::api::v5::BookUpdate;
use crate::api::v5::{BookUpdate, Levels};

#[test]
fn size_of_levels() {
use std::mem::size_of;
assert_eq!(size_of::<BookUpdate>(), 536);
assert_eq!(size_of::<BookUpdate>(), 552);
assert_eq!(size_of::<Levels>(), 248);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/serde_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ mod tests_maybe_float {
fn can_deser_maybe_float_missing_key() {
#[derive(Debug, Deserialize, Default)]
struct Foo {
#[serde(default)]
bar: Maybe<f64>,
}
let s = r#"{ }"#;
Expand Down Expand Up @@ -583,6 +584,7 @@ mod tests_maybe_u64 {
fn can_deser_maybe_u64_missing_key() {
#[derive(Debug, Deserialize, Default)]
struct Foo {
#[serde(default)]
bar: Maybe<u64>,
}
let s = r#"{ }"#;
Expand Down

0 comments on commit 2be4c8e

Please sign in to comment.