mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 06:44:16 +00:00
Merge pull request #4884 from nyurik/impl-order
chore: Order trait impl same as trait
This commit is contained in:
commit
47c3b6f580
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue