File tree 3 files changed +6
-12
lines changed
3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 21
21
strategy :
22
22
fail-fast : false
23
23
matrix :
24
- os : ["ubuntu-latest", "macos-latest", " windows-latest"]
24
+ os : ["windows-latest"]
25
25
rust : ["stable", "1.83"]
26
- flags : ["", "--all-features"]
26
+ flags : ["", "--all-features --no-fail-fast "]
27
27
exclude :
28
28
# Skip because some features have higher MSRV.
29
29
- rust : " 1.83" # MSRV
Original file line number Diff line number Diff line change @@ -127,12 +127,7 @@ impl Source {
127
127
#[ instrument( name = "read_source" , level = "debug" , skip_all, err) ]
128
128
pub fn read ( file : & Path ) -> Result < Self , SolcIoError > {
129
129
trace ! ( file=%file. display( ) ) ;
130
- let mut content = fs:: read_to_string ( file) . map_err ( |err| SolcIoError :: new ( err, file) ) ?;
131
-
132
- // Normalize line endings to ensure deterministic metadata.
133
- if content. contains ( '\r' ) {
134
- content = content. replace ( "\r \n " , "\n " ) ;
135
- }
130
+ let content = fs:: read_to_string ( file) . map_err ( |err| SolcIoError :: new ( err, file) ) ?;
136
131
137
132
Ok ( Self :: new ( content) )
138
133
}
Original file line number Diff line number Diff line change @@ -911,11 +911,10 @@ fn replace_source_content<'a>(
911
911
let mut offset = 0 ;
912
912
let mut content = source. as_bytes ( ) . to_vec ( ) ;
913
913
for ( range, new_value) in updates {
914
- let start = ( range. start as isize + offset) as usize ;
915
- let end = ( range. end as isize + offset) as usize ;
914
+ let update_range = utils:: range_by_offset ( & range, offset) ;
916
915
917
- content. splice ( start..end, new_value. bytes ( ) ) ;
918
- offset += new_value. len ( ) as isize - ( end - start) as isize ;
916
+ content. splice ( update_range . start ..update_range . end , new_value. bytes ( ) ) ;
917
+ offset += new_value. len ( ) as isize - ( update_range . end - update_range . start ) as isize ;
919
918
}
920
919
921
920
String :: from_utf8 ( content) . unwrap ( )
You can’t perform that action at this time.
0 commit comments