1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-11-24 09:02:14 +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:
dependabot[bot] 2024-02-05 11:25:39 +00:00 committed by GitHub
parent 73a6ab6ded
commit e921d4bb1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 30 additions and 29 deletions

23
Cargo.lock generated
View File

@ -1228,7 +1228,7 @@ dependencies = [
"once_cell", "once_cell",
"opener", "opener",
"pathdiff", "pathdiff",
"pulldown-cmark", "pulldown-cmark 0.9.6",
"regex", "regex",
"serde", "serde",
"serde_json", "serde_json",
@ -1265,7 +1265,7 @@ dependencies = [
"log", "log",
"mdbook", "mdbook",
"pretty_env_logger", "pretty_env_logger",
"pulldown-cmark", "pulldown-cmark 0.10.0",
] ]
[[package]] [[package]]
@ -1773,9 +1773,20 @@ dependencies = [
[[package]] [[package]]
name = "pulldown-cmark" name = "pulldown-cmark"
version = "0.9.5" version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80eb9f69aec5cd8828765a75f739383fbbe3e8b9d84370bde1cc90487700794a" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b"
dependencies = [
"bitflags 2.4.1",
"memchr",
"unicase",
]
[[package]]
name = "pulldown-cmark"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dce76ce678ffc8e5675b22aa1405de0b7037e2fdf8913fea40d1926c6fe1e6e7"
dependencies = [ dependencies = [
"bitflags 2.4.1", "bitflags 2.4.1",
"memchr", "memchr",
@ -2385,9 +2396,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.35.1" version = "1.36.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes", "bytes",

View File

@ -12,4 +12,4 @@ anyhow = "1.0.79"
log = "0.4.17" log = "0.4.17"
mdbook = "0.4.25" mdbook = "0.4.25"
pretty_env_logger = "0.5.0" pretty_env_logger = "0.5.0"
pulldown-cmark = { version = "0.9.5", default-features = false } pulldown-cmark = { version = "0.10.0", default-features = false }

View File

@ -13,7 +13,7 @@
// limitations under the License. // limitations under the License.
use log::{info, trace}; 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::fs::{create_dir_all, File};
use std::io::Write; use std::io::Write;
use std::path::Path; use std::path::Path;
@ -61,8 +61,8 @@ pub fn process(output_directory: &Path, input_contents: &str) -> anyhow::Result<
output_file.write(text.as_bytes())?; output_file.write(text.as_bytes())?;
} }
} }
Event::End(Tag::CodeBlock(x)) => { Event::End(TagEnd::CodeBlock) => {
info!("End {:?}", x); info!("End");
current_file = None; current_file = None;
} }
_ => {} _ => {}

View File

@ -6,5 +6,5 @@ edition = "2021"
[dependencies] [dependencies]
futures-util = { version = "0.3.30", features = ["sink"] } futures-util = { version = "0.3.30", features = ["sink"] }
http = "1.0.0" 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"] } tokio-websockets = { version = "0.5.1", features = ["client", "fastrand", "server", "sha1_smol"] }

View File

@ -36,9 +36,9 @@ mod ffi {
/// An iterator over contiguous chunks of a discontiguous file object. /// An iterator over contiguous chunks of a discontiguous file object.
/// ///
/// Toy implementation uses a Vec<Vec<u8>> but in reality this might be iterating /// Toy implementation uses a Vec<Vec<u8>> but in reality this might be
/// over some more complex Rust data structure like a rope, or maybe loading /// iterating over some more complex Rust data structure like a rope, or maybe
/// chunks lazily from somewhere. /// loading chunks lazily from somewhere.
pub struct MultiBuf { pub struct MultiBuf {
chunks: Vec<Vec<u8>>, chunks: Vec<Vec<u8>>,
pos: usize, pos: usize,

View File

@ -24,13 +24,7 @@ pub struct HealthReport<'a> {
impl User { impl User {
pub fn new(name: String, age: u32, height: f32) -> Self { pub fn new(name: String, age: u32, height: f32) -> Self {
Self { Self { name, age, height, visit_count: 0, last_blood_pressure: None }
name,
age,
height,
visit_count: 0,
last_blood_pressure: None,
}
} }
// ANCHOR_END: setup // ANCHOR_END: setup
@ -68,18 +62,14 @@ fn main() {
fn test_visit() { fn test_visit() {
let mut bob = User::new(String::from("Bob"), 32, 155.2); let mut bob = User::new(String::from("Bob"), 32, 155.2);
assert_eq!(bob.visit_count, 0); assert_eq!(bob.visit_count, 0);
let report = bob.visit_doctor(Measurements { let report =
height: 156.1, bob.visit_doctor(Measurements { height: 156.1, blood_pressure: (120, 80) });
blood_pressure: (120, 80),
});
assert_eq!(report.patient_name, "Bob"); assert_eq!(report.patient_name, "Bob");
assert_eq!(report.visit_count, 1); assert_eq!(report.visit_count, 1);
assert_eq!(report.blood_pressure_change, None); assert_eq!(report.blood_pressure_change, None);
let report = bob.visit_doctor(Measurements { let report =
height: 156.1, bob.visit_doctor(Measurements { height: 156.1, blood_pressure: (115, 76) });
blood_pressure: (115, 76),
});
assert_eq!(report.visit_count, 2); assert_eq!(report.visit_count, 2);
assert_eq!(report.blood_pressure_change, Some((-5, -4))); assert_eq!(report.blood_pressure_change, Some((-5, -4)));