You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-11-06 09:29:26 +02:00
cargo: bump the minor group with 2 updates (#1783)
Bumps the minor group with 2 updates: [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) and [tokio](https://github.com/tokio-rs/tokio). Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Walbran <qwandor@google.com>
This commit is contained in:
6
third_party/cxx/blobstore/src/main.rs
vendored
6
third_party/cxx/blobstore/src/main.rs
vendored
@@ -36,9 +36,9 @@ mod ffi {
|
||||
|
||||
/// An iterator over contiguous chunks of a discontiguous file object.
|
||||
///
|
||||
/// Toy implementation uses a Vec<Vec<u8>> but in reality this might be iterating
|
||||
/// over some more complex Rust data structure like a rope, or maybe loading
|
||||
/// chunks lazily from somewhere.
|
||||
/// Toy implementation uses a Vec<Vec<u8>> but in reality this might be
|
||||
/// iterating over some more complex Rust data structure like a rope, or maybe
|
||||
/// loading chunks lazily from somewhere.
|
||||
pub struct MultiBuf {
|
||||
chunks: Vec<Vec<u8>>,
|
||||
pos: usize,
|
||||
|
||||
@@ -24,13 +24,7 @@ pub struct HealthReport<'a> {
|
||||
|
||||
impl User {
|
||||
pub fn new(name: String, age: u32, height: f32) -> Self {
|
||||
Self {
|
||||
name,
|
||||
age,
|
||||
height,
|
||||
visit_count: 0,
|
||||
last_blood_pressure: None,
|
||||
}
|
||||
Self { name, age, height, visit_count: 0, last_blood_pressure: None }
|
||||
}
|
||||
// ANCHOR_END: setup
|
||||
|
||||
@@ -68,18 +62,14 @@ fn main() {
|
||||
fn test_visit() {
|
||||
let mut bob = User::new(String::from("Bob"), 32, 155.2);
|
||||
assert_eq!(bob.visit_count, 0);
|
||||
let report = bob.visit_doctor(Measurements {
|
||||
height: 156.1,
|
||||
blood_pressure: (120, 80),
|
||||
});
|
||||
let report =
|
||||
bob.visit_doctor(Measurements { height: 156.1, blood_pressure: (120, 80) });
|
||||
assert_eq!(report.patient_name, "Bob");
|
||||
assert_eq!(report.visit_count, 1);
|
||||
assert_eq!(report.blood_pressure_change, None);
|
||||
|
||||
let report = bob.visit_doctor(Measurements {
|
||||
height: 156.1,
|
||||
blood_pressure: (115, 76),
|
||||
});
|
||||
let report =
|
||||
bob.visit_doctor(Measurements { height: 156.1, blood_pressure: (115, 76) });
|
||||
|
||||
assert_eq!(report.visit_count, 2);
|
||||
assert_eq!(report.blood_pressure_change, Some((-5, -4)));
|
||||
|
||||
Reference in New Issue
Block a user