File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ struct FmtContext {
3535}
3636
3737// the "main" function of cargo dev fmt
38+ #[ allow( clippy:: missing_panics_doc) ]
3839pub fn run ( check : bool , verbose : bool ) {
3940 fn try_run ( context : & FmtContext ) -> Result < bool , CliError > {
4041 let mut success = true ;
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ static CARGO_CLIPPY_EXE: &str = "cargo-clippy";
2929static CARGO_CLIPPY_EXE : & str = "cargo-clippy.exe" ;
3030
3131/// Returns the path to the `cargo-clippy` binary
32+ ///
33+ /// # Panics
34+ ///
35+ /// Panics if the path of current executable could not be retrieved.
3236#[ must_use]
3337pub fn cargo_clippy_path ( ) -> PathBuf {
3438 let mut path = std:: env:: current_exe ( ) . expect ( "failed to get current executable name" ) ;
@@ -61,6 +65,8 @@ pub fn clippy_project_root() -> PathBuf {
6165 panic ! ( "error: Can't determine root of project. Please run inside a Clippy working dir." ) ;
6266}
6367
68+ /// # Panics
69+ /// Panics if given command result was failed.
6470pub fn exit_if_err ( status : io:: Result < ExitStatus > ) {
6571 match status. expect ( "failed to run command" ) . code ( ) {
6672 Some ( 0 ) => { } ,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ impl<T> Context for io::Result<T> {
3636/// # Errors
3737///
3838/// This function errors out if the files couldn't be created or written to.
39+ #[ allow( clippy:: missing_panics_doc) ]
3940pub fn create (
4041 pass : & String ,
4142 lint_name : Option < & String > ,
You can’t perform that action at this time.
0 commit comments