Skip to content

Commit

Permalink
Eliminate glob imports from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 19, 2024
1 parent 866c80c commit 896a730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions examples/dump-syntax/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ enum Error {

impl Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
use self::Error::*;

match self {
IncorrectUsage => write!(f, "Usage: dump-syntax path/to/filename.rs"),
ReadFile(error) => write!(f, "Unable to read file: {}", error),
ParseFile {
Error::IncorrectUsage => write!(f, "Usage: dump-syntax path/to/filename.rs"),
Error::ReadFile(error) => write!(f, "Unable to read file: {}", error),
Error::ParseFile {
error,
filepath,
source_code,
Expand Down
2 changes: 1 addition & 1 deletion examples/heapsize/heapsize/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::mem;

pub use heapsize_derive::*;
pub use heapsize_derive::HeapSize;

pub trait HeapSize {
/// Total number of bytes of heap memory owned by `self`.
Expand Down

0 comments on commit 896a730

Please sign in to comment.