You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-05 14:10:29 +02:00
cargo fmt
This commit is contained in:
@ -35,8 +35,8 @@
|
|||||||
//! item becomes the first slide in that segment. Any other sub-items of the
|
//! item becomes the first slide in that segment. Any other sub-items of the
|
||||||
//! top-level item are treated as further slides in the same segment.
|
//! top-level item are treated as further slides in the same segment.
|
||||||
|
|
||||||
use crate::frontmatter::{split_frontmatter, Frontmatter};
|
use crate::frontmatter::{Frontmatter, split_frontmatter};
|
||||||
use crate::markdown::{duration, Table};
|
use crate::markdown::{Table, duration};
|
||||||
use mdbook::book::{Book, BookItem, Chapter};
|
use mdbook::book::{Book, BookItem, Chapter};
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
@ -318,7 +318,9 @@ impl Session {
|
|||||||
}
|
}
|
||||||
format!(
|
format!(
|
||||||
"Including {BREAK_DURATION} minute breaks, this session should take about {}. It contains:\n\n{}",
|
"Including {BREAK_DURATION} minute breaks, this session should take about {}. It contains:\n\n{}",
|
||||||
duration(self.minutes()), segments)
|
duration(self.minutes()),
|
||||||
|
segments
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return the total duration of this session.
|
/// Return the total duration of this session.
|
||||||
@ -337,11 +339,7 @@ impl Session {
|
|||||||
///
|
///
|
||||||
/// This includes breaks between segments.
|
/// This includes breaks between segments.
|
||||||
pub fn target_minutes(&self) -> u64 {
|
pub fn target_minutes(&self) -> u64 {
|
||||||
if self.target_minutes > 0 {
|
if self.target_minutes > 0 { self.target_minutes } else { self.minutes() }
|
||||||
self.target_minutes
|
|
||||||
} else {
|
|
||||||
self.minutes()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
use log::{info, trace};
|
use log::{info, trace};
|
||||||
use pulldown_cmark::{Event, Parser, Tag, TagEnd};
|
use pulldown_cmark::{Event, Parser, Tag, TagEnd};
|
||||||
use std::fs::{create_dir_all, File};
|
use std::fs::{File, create_dir_all};
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use log::trace;
|
use log::trace;
|
||||||
|
use mdbook::BookItem;
|
||||||
use mdbook::book::Book;
|
use mdbook::book::Book;
|
||||||
use mdbook::renderer::RenderContext;
|
use mdbook::renderer::RenderContext;
|
||||||
use mdbook::BookItem;
|
|
||||||
use mdbook_exerciser::process;
|
use mdbook_exerciser::process;
|
||||||
use std::fs::{create_dir, remove_dir_all};
|
use std::fs::{create_dir, remove_dir_all};
|
||||||
use std::io::stdin;
|
use std::io::stdin;
|
||||||
|
@ -17,8 +17,8 @@ use std::io::Write as _;
|
|||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use anyhow::anyhow;
|
use anyhow::anyhow;
|
||||||
use fantoccini::elements::Element;
|
|
||||||
use fantoccini::Client;
|
use fantoccini::Client;
|
||||||
|
use fantoccini::elements::Element;
|
||||||
use log::{debug, warn};
|
use log::{debug, warn};
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use strum::Display;
|
use strum::Display;
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
// ANCHOR: solution
|
// ANCHOR: solution
|
||||||
// ANCHOR: setup
|
// ANCHOR: setup
|
||||||
use futures_util::stream::StreamExt;
|
|
||||||
use futures_util::SinkExt;
|
use futures_util::SinkExt;
|
||||||
|
use futures_util::stream::StreamExt;
|
||||||
use http::Uri;
|
use http::Uri;
|
||||||
use tokio::io::{AsyncBufReadExt, BufReader};
|
use tokio::io::{AsyncBufReadExt, BufReader};
|
||||||
use tokio_websockets::{ClientBuilder, Message};
|
use tokio_websockets::{ClientBuilder, Message};
|
||||||
|
@ -19,7 +19,7 @@ use futures_util::stream::StreamExt;
|
|||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use tokio::net::{TcpListener, TcpStream};
|
use tokio::net::{TcpListener, TcpStream};
|
||||||
use tokio::sync::broadcast::{channel, Sender};
|
use tokio::sync::broadcast::{Sender, channel};
|
||||||
use tokio_websockets::{Message, ServerBuilder, WebSocketStream};
|
use tokio_websockets::{Message, ServerBuilder, WebSocketStream};
|
||||||
// ANCHOR_END: setup
|
// ANCHOR_END: setup
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
// ANCHOR: solution
|
// ANCHOR: solution
|
||||||
// ANCHOR: Philosopher
|
// ANCHOR: Philosopher
|
||||||
use std::sync::{mpsc, Arc, Mutex};
|
use std::sync::{Arc, Mutex, mpsc};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
// ANCHOR: solution
|
// ANCHOR: solution
|
||||||
use std::sync::{mpsc, Arc, Mutex};
|
use std::sync::{Arc, Mutex, mpsc};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
||||||
// ANCHOR: setup
|
// ANCHOR: setup
|
||||||
use reqwest::blocking::Client;
|
|
||||||
use reqwest::Url;
|
use reqwest::Url;
|
||||||
|
use reqwest::blocking::Client;
|
||||||
use scraper::{Html, Selector};
|
use scraper::{Html, Selector};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
3
third_party/cxx/blobstore/build.rs
vendored
3
third_party/cxx/blobstore/build.rs
vendored
@ -1,6 +1,7 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
// Find target directory, either from CARGO_TARGET_DIR or in-tree if unset.
|
// Find target directory, either from CARGO_TARGET_DIR or in-tree if unset.
|
||||||
let mut src_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap_or("../../../target".into());
|
let mut src_dir =
|
||||||
|
std::env::var_os("CARGO_TARGET_DIR").unwrap_or("../../../target".into());
|
||||||
src_dir.push("/cxxbridge/demo/src");
|
src_dir.push("/cxxbridge/demo/src");
|
||||||
|
|
||||||
cxx_build::bridge("src/main.rs")
|
cxx_build::bridge("src/main.rs")
|
||||||
|
Reference in New Issue
Block a user