Skip to content

Commit

Permalink
Merge pull request #4884 from nyurik/impl-order
Browse files Browse the repository at this point in the history
chore: Order trait impl same as trait
  • Loading branch information
epage committed May 4, 2023
2 parents 5fb1b25 + 1dc6304 commit 47c3b6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clap_complete/src/generator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ pub trait Generator {
/// pub struct Fish;
///
/// impl Generator for Fish {
/// # fn generate(&self, cmd: &Command, buf: &mut dyn Write) {}
/// fn file_name(&self, name: &str) -> String {
/// format!("{}.fish", name)
/// }
/// # fn generate(&self, cmd: &Command, buf: &mut dyn Write) {}
/// }
/// ```
fn file_name(&self, name: &str) -> String;
Expand All @@ -55,12 +55,12 @@ pub trait Generator {
/// pub struct ClapDebug;
///
/// impl Generator for ClapDebug {
/// # fn file_name(&self, name: &str) -> String {
/// # name.into()
/// # }
/// fn generate(&self, cmd: &Command, buf: &mut dyn Write) {
/// write!(buf, "{}", cmd).unwrap();
/// }
/// # fn file_name(&self, name: &str) -> String {
/// # name.into()
/// # }
/// }
/// ```
fn generate(&self, cmd: &Command, buf: &mut dyn Write);
Expand Down

0 comments on commit 47c3b6f

Please sign in to comment.