Skip to content

Commit 346efae

Browse files
committed
Touch up PR 1737
1 parent 69fadff commit 346efae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ast_struct! {
1515
///
1616
/// ```
1717
/// use std::env;
18-
/// use std::fs::read_to_string;
18+
/// use std::fs;
1919
/// use std::process;
2020
///
2121
/// fn main() {
@@ -33,7 +33,7 @@ ast_struct! {
3333
/// }
3434
/// };
3535
///
36-
/// let src = read_to_string(&filename).expect("unable to read file");
36+
/// let src = fs::read_to_string(&filename).expect("unable to read file");
3737
/// let syntax = syn::parse_file(&src).expect("unable to parse file");
3838
///
3939
/// // Debug impl is available if Syn is built with "extra-traits" feature.

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,11 +973,11 @@ pub fn parse_str<T: parse::Parse>(s: &str) -> Result<T> {
973973
///
974974
/// ```no_run
975975
/// use std::error::Error;
976-
/// use std::fs::read_to_string;
976+
/// use std::fs;
977977
/// use std::io::Read;
978978
///
979979
/// fn run() -> Result<(), Box<dyn Error>> {
980-
/// let content = read_to_string("path/to/code.rs")?;
980+
/// let content = fs::read_to_string("path/to/code.rs")?;
981981
/// let ast = syn::parse_file(&content)?;
982982
/// if let Some(shebang) = ast.shebang {
983983
/// println!("{}", shebang);

0 commit comments

Comments
 (0)