Skip to content

Commit

Permalink
Merge pull request #4201 from rust-lang/listing-simple-no-filename
Browse files Browse the repository at this point in the history
infra: don’t emit `Filename: ` in mdbook-trpl-listing output
  • Loading branch information
chriskrycho authored Jan 13, 2025
2 parents 5a65e2a + 551b0ff commit ec07cb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mdbook-trpl/src/listing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl Listing {
fn opening_text(&self) -> String {
self.file_name
.as_ref()
.map(|file_name| format!("Filename: {file_name}\n"))
.map(|file_name| format!("{file_name}\n"))
.unwrap_or_default()
}

Expand Down
2 changes: 1 addition & 1 deletion packages/mdbook-trpl/src/listing/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Trailing text."#,
&result.unwrap(),
r#"Leading text.
Filename: src/main.rs
src/main.rs
```rust
fn main() {}
Expand Down

0 comments on commit ec07cb8

Please sign in to comment.