Skip to content

Commit

Permalink
cargo: bump the minor group with 2 updates (google#1783)
Browse files Browse the repository at this point in the history
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Walbran <[email protected]>
  • Loading branch information
dependabot[bot] and qwandor authored Feb 5, 2024
1 parent 73a6ab6 commit e921d4b
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 29 deletions.
23 changes: 17 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mdbook-exerciser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ anyhow = "1.0.79"
log = "0.4.17"
mdbook = "0.4.25"
pretty_env_logger = "0.5.0"
pulldown-cmark = { version = "0.9.5", default-features = false }
pulldown-cmark = { version = "0.10.0", default-features = false }
6 changes: 3 additions & 3 deletions mdbook-exerciser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

use log::{info, trace};
use pulldown_cmark::{Event, Parser, Tag};
use pulldown_cmark::{Event, Parser, Tag, TagEnd};
use std::fs::{create_dir_all, File};
use std::io::Write;
use std::path::Path;
Expand Down Expand Up @@ -61,8 +61,8 @@ pub fn process(output_directory: &Path, input_contents: &str) -> anyhow::Result<
output_file.write(text.as_bytes())?;
}
}
Event::End(Tag::CodeBlock(x)) => {
info!("End {:?}", x);
Event::End(TagEnd::CodeBlock) => {
info!("End");
current_file = None;
}
_ => {}
Expand Down
2 changes: 1 addition & 1 deletion src/exercises/concurrency/chat-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2021"
[dependencies]
futures-util = { version = "0.3.30", features = ["sink"] }
http = "1.0.0"
tokio = { version = "1.28.1", features = ["full"] }
tokio = { version = "1.36.0", features = ["full"] }
tokio-websockets = { version = "0.5.1", features = ["client", "fastrand", "server", "sha1_smol"] }
6 changes: 3 additions & 3 deletions third_party/cxx/blobstore/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 5 additions & 15 deletions third_party/rust-on-exercism/health-statistics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)));
Expand Down

0 comments on commit e921d4b

Please sign in to comment.