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 {
35
35
}
36
36
37
37
// the "main" function of cargo dev fmt
38
+ #[ allow( clippy:: missing_panics_doc) ]
38
39
pub fn run ( check : bool , verbose : bool ) {
39
40
fn try_run ( context : & FmtContext ) -> Result < bool , CliError > {
40
41
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";
29
29
static CARGO_CLIPPY_EXE : & str = "cargo-clippy.exe" ;
30
30
31
31
/// Returns the path to the `cargo-clippy` binary
32
+ ///
33
+ /// # Panics
34
+ ///
35
+ /// Panics if the path of current executable could not be retrieved.
32
36
#[ must_use]
33
37
pub fn cargo_clippy_path ( ) -> PathBuf {
34
38
let mut path = std:: env:: current_exe ( ) . expect ( "failed to get current executable name" ) ;
@@ -61,6 +65,8 @@ pub fn clippy_project_root() -> PathBuf {
61
65
panic ! ( "error: Can't determine root of project. Please run inside a Clippy working dir." ) ;
62
66
}
63
67
68
+ /// # Panics
69
+ /// Panics if given command result was failed.
64
70
pub fn exit_if_err ( status : io:: Result < ExitStatus > ) {
65
71
match status. expect ( "failed to run command" ) . code ( ) {
66
72
Some ( 0 ) => { } ,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ impl<T> Context for io::Result<T> {
36
36
/// # Errors
37
37
///
38
38
/// This function errors out if the files couldn't be created or written to.
39
+ #[ allow( clippy:: missing_panics_doc) ]
39
40
pub fn create (
40
41
pass : & String ,
41
42
lint_name : Option < & String > ,
You can’t perform that action at this time.
0 commit comments