Fix doc test.

This commit is contained in:
Stephen Chung 2021-12-15 12:26:05 +08:00
parent ef14079c61
commit 7afec287d8

View File

@ -158,7 +158,7 @@ impl Engine {
/// engine.on_progress(move |ops| { /// engine.on_progress(move |ops| {
/// if ops > 1000 { /// if ops > 1000 {
/// Some("Over 1,000 operations!".into()) /// Some("Over 1,000 operations!".into())
/// } else if ops % 100 == 0 { /// } else if ops % 123 == 0 {
/// *logger.write().unwrap() = ops; /// *logger.write().unwrap() = ops;
/// None /// None
/// } else { /// } else {
@ -169,7 +169,7 @@ impl Engine {
/// engine.run("for x in 0..5000 { print(x); }") /// engine.run("for x in 0..5000 { print(x); }")
/// .expect_err("should error"); /// .expect_err("should error");
/// ///
/// assert_eq!(*result.read().unwrap(), 9600); /// assert_eq!(*result.read().unwrap(), 984);
/// ///
/// # Ok(()) /// # Ok(())
/// # } /// # }