File tree 4 files changed +8
-8
lines changed
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -306,9 +306,9 @@ impl Compression {
306
306
307
307
#[ test]
308
308
fn limit_string_test ( ) {
309
- assert_eq ! ( "hello" , limit_string( & "hello world" . to_owned ( ) , 5 ) ) ;
310
- assert_eq ! ( "hi ☹" , limit_string( & "hi ☹☹" . to_owned ( ) , 6 ) ) ;
311
- assert_eq ! ( "hi " , limit_string( & "hi ☹☹" . to_owned ( ) , 5 ) ) ;
309
+ assert_eq ! ( "hello" , limit_string( "hello world" , 5 ) ) ;
310
+ assert_eq ! ( "hi ☹" , limit_string( "hi ☹☹" , 6 ) ) ;
311
+ assert_eq ! ( "hi " , limit_string( "hi ☹☹" , 5 ) ) ;
312
312
}
313
313
314
314
#[ test]
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ pub fn create_source_dir(files: Vec<(&'static str, &'static str)>) -> SourceArch
28
28
let path = source_archive_dir. join ( filename) ;
29
29
let mut file = File :: create ( & path) . unwrap ( ) ;
30
30
file. write_all ( contents. as_bytes ( ) ) . unwrap ( ) ;
31
- file_paths. push ( PathBuf :: from ( path) ) ;
31
+ file_paths. push ( path) ;
32
32
}
33
33
34
34
let file_list = {
@@ -53,7 +53,7 @@ pub fn create_source_dir(files: Vec<(&'static str, &'static str)>) -> SourceArch
53
53
pub fn expect_trap_file ( root_dir : & Path , filename : & str ) {
54
54
let root_dir_relative = {
55
55
let r = root_dir. display ( ) . to_string ( ) ;
56
- r. strip_prefix ( "/" ) . unwrap ( ) . to_string ( )
56
+ r. strip_prefix ( '/' ) . unwrap ( ) . to_string ( )
57
57
} ;
58
58
let trap_gz = root_dir
59
59
. join ( "trap" )
@@ -69,5 +69,5 @@ pub fn expect_trap_file(root_dir: &Path, filename: &str) {
69
69
fn create_dir ( root : & Path , path : impl AsRef < Path > ) -> PathBuf {
70
70
let full_path = root. join ( path) ;
71
71
std:: fs:: create_dir_all ( & full_path) . expect ( "Failed to create directory" ) ;
72
- full_path. into ( )
72
+ full_path
73
73
}
Original file line number Diff line number Diff line change 1
1
use codeql_extractor:: extractor:: simple;
2
2
use codeql_extractor:: trap;
3
3
4
- use tree_sitter_ql ;
4
+
5
5
6
6
mod common;
7
7
use common:: { create_source_dir, expect_trap_file, SourceArchive } ;
Original file line number Diff line number Diff line change 1
1
use codeql_extractor:: extractor:: simple;
2
2
use codeql_extractor:: trap;
3
- use tree_sitter_ql ;
3
+
4
4
5
5
mod common;
6
6
use common:: { create_source_dir, expect_trap_file, SourceArchive } ;
You can’t perform that action at this time.
0 commit comments