File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -306,9 +306,9 @@ impl Compression {
306306
307307#[ test]
308308fn 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 ) ) ;
312312}
313313
314314#[ 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
2828 let path = source_archive_dir. join ( filename) ;
2929 let mut file = File :: create ( & path) . unwrap ( ) ;
3030 file. write_all ( contents. as_bytes ( ) ) . unwrap ( ) ;
31- file_paths. push ( PathBuf :: from ( path) ) ;
31+ file_paths. push ( path) ;
3232 }
3333
3434 let file_list = {
@@ -53,7 +53,7 @@ pub fn create_source_dir(files: Vec<(&'static str, &'static str)>) -> SourceArch
5353pub fn expect_trap_file ( root_dir : & Path , filename : & str ) {
5454 let root_dir_relative = {
5555 let r = root_dir. display ( ) . to_string ( ) ;
56- r. strip_prefix ( "/" ) . unwrap ( ) . to_string ( )
56+ r. strip_prefix ( '/' ) . unwrap ( ) . to_string ( )
5757 } ;
5858 let trap_gz = root_dir
5959 . join ( "trap" )
@@ -69,5 +69,5 @@ pub fn expect_trap_file(root_dir: &Path, filename: &str) {
6969fn create_dir ( root : & Path , path : impl AsRef < Path > ) -> PathBuf {
7070 let full_path = root. join ( path) ;
7171 std:: fs:: create_dir_all ( & full_path) . expect ( "Failed to create directory" ) ;
72- full_path. into ( )
72+ full_path
7373}
Original file line number Diff line number Diff line change 11use codeql_extractor:: extractor:: simple;
22use codeql_extractor:: trap;
33
4- use tree_sitter_ql ;
4+
55
66mod common;
77use common:: { create_source_dir, expect_trap_file, SourceArchive } ;
Original file line number Diff line number Diff line change 11use codeql_extractor:: extractor:: simple;
22use codeql_extractor:: trap;
3- use tree_sitter_ql ;
3+
44
55mod common;
66use common:: { create_source_dir, expect_trap_file, SourceArchive } ;
You can’t perform that action at this time.
0 commit comments