Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u8 appears to be missing from hydrate. This adds a u8 to the tests. #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion autosurgeon/src/hydrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ mod tests {
struct Employee {
name: String,
number: u64,
mass: u8,
}

impl Hydrate for Company {
Expand All @@ -285,7 +286,8 @@ mod tests {
fn hydrate_map<D: ReadDoc>(doc: &D, obj: &automerge::ObjId) -> Result<Self, HydrateError> {
let name = hydrate_prop(doc, obj, "name")?;
let number = hydrate_prop(doc, obj, "number")?;
Ok(Employee { name, number })
let mass = hydrate_prop(doc, obj, "number")?;
Ok(Employee { name, number, mass })
}
}

Expand All @@ -310,6 +312,7 @@ mod tests {
employees: vec![Employee {
name: "Satya Nadella".to_string(),
number: 1,
mass: 255,
}],
}
);
Expand All @@ -336,6 +339,7 @@ mod tests {
employees: vec![Employee {
name: "Satya Nadella".to_string(),
number: 1,
mass: 255
}],
}
);
Expand Down