Skip to content

Commit 9434635

Browse files
committed
Update dependency
1 parent 8f9c06f commit 9434635

File tree

4 files changed

+134
-58
lines changed

4 files changed

+134
-58
lines changed

.cargo/config

Whitespace-only changes.

Cargo.lock

+113-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hashify"
3-
version = "1.3.2"
3+
version = "1.3.4"
44
authors = ["Dominik 'Rengyr' Kosík <of@rengyr.eu>"]
55
edition = "2021"
66

src/main.rs

+20-20
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct Setting {
4444

4545
fn main() {
4646
let matches = App::new("Hashify")
47-
.version("1.3.3")
47+
.version("1.3.4")
4848
.author("Dominik 'Rengyr' Kosík <of@rengyr.eu>")
4949
.about("CRC32 hash.")
5050
.arg(
@@ -203,7 +203,7 @@ fn hash_from_input<R: Read>(mut input: R, settings: &Setting) -> Result<u32, Err
203203
let mut length = 1;
204204

205205
while length > 0 {
206-
length = match input.read(&mut *buffer) {
206+
length = match input.read(&mut buffer) {
207207
Ok(len) => len,
208208
Err(e) => {
209209
return Err(Error::new(
@@ -451,7 +451,7 @@ mod tests {
451451
panic!("Error when creating file for test.\nError: {}", e);
452452
}
453453
};
454-
match f.write("Test string\nIn test file".as_bytes()) {
454+
match f.write_all("Test string\nIn test file".as_bytes()) {
455455
Ok(_) => {}
456456
Err(e) => {
457457
panic!("Error when writing to the test file.\nError: {}", e);
@@ -522,7 +522,7 @@ mod tests {
522522
panic!("Error when creating file for test.\nError: {}", e);
523523
}
524524
};
525-
match f.write("Test string\nIn test file".as_bytes()) {
525+
match f.write_all("Test string\nIn test file".as_bytes()) {
526526
Ok(_) => {}
527527
Err(e) => {
528528
panic!("Error when writing to the test file.\nError: {}", e);
@@ -537,7 +537,7 @@ mod tests {
537537
panic!("Error when creating file for test.\nError: {}", e);
538538
}
539539
};
540-
match f.write("Second file :3".as_bytes()) {
540+
match f.write_all("Second file :3".as_bytes()) {
541541
Ok(_) => {}
542542
Err(e) => {
543543
panic!("Error when writing to the test file.\nError: {}", e);
@@ -626,7 +626,7 @@ mod tests {
626626
panic!("Error when creating file for test.\nError: {}", e);
627627
}
628628
};
629-
match f.write("Test string\nIn test file".as_bytes()) {
629+
match f.write_all("Test string\nIn test file".as_bytes()) {
630630
Ok(_) => {}
631631
Err(e) => {
632632
panic!("Error when writing to the test file.\nError: {}", e);
@@ -649,7 +649,7 @@ mod tests {
649649
panic!("Error when creating file for test.\nError: {}", e);
650650
}
651651
};
652-
match f.write("Second file :3".as_bytes()) {
652+
match f.write_all("Second file :3".as_bytes()) {
653653
Ok(_) => {}
654654
Err(e) => {
655655
panic!("Error when writing to the test file.\nError: {}", e);
@@ -672,7 +672,7 @@ mod tests {
672672
panic!("Error when creating file for test.\nError: {}", e);
673673
}
674674
};
675-
match f.write("Another file \\o/".as_bytes()) {
675+
match f.write_all("Another file \\o/".as_bytes()) {
676676
Ok(_) => {}
677677
Err(e) => {
678678
panic!("Error when writing to the test file.\nError: {}", e);
@@ -772,7 +772,7 @@ mod tests {
772772
panic!("Error when creating file for test.\nError: {}", e);
773773
}
774774
};
775-
match f.write("Test string\nIn test file".as_bytes()) {
775+
match f.write_all("Test string\nIn test file".as_bytes()) {
776776
Ok(_) => {}
777777
Err(e) => {
778778
panic!("Error when writing to the test file.\nError: {}", e);
@@ -787,7 +787,7 @@ mod tests {
787787
panic!("Error when creating file for test.\nError: {}", e);
788788
}
789789
};
790-
match f.write("Second file :3".as_bytes()) {
790+
match f.write_all("Second file :3".as_bytes()) {
791791
Ok(_) => {}
792792
Err(e) => {
793793
panic!("Error when writing to the test file.\nError: {}", e);
@@ -874,7 +874,7 @@ mod tests {
874874
panic!("Error when creating file for test.\nError: {}", e);
875875
}
876876
};
877-
match f.write("Test string\nIn test file".as_bytes()) {
877+
match f.write_all("Test string\nIn test file".as_bytes()) {
878878
Ok(_) => {}
879879
Err(e) => {
880880
panic!("Error when writing to the test file.\nError: {}", e);
@@ -897,7 +897,7 @@ mod tests {
897897
panic!("Error when creating file for test.\nError: {}", e);
898898
}
899899
};
900-
match f.write("Second file :3".as_bytes()) {
900+
match f.write_all("Second file :3".as_bytes()) {
901901
Ok(_) => {}
902902
Err(e) => {
903903
panic!("Error when writing to the test file.\nError: {}", e);
@@ -920,7 +920,7 @@ mod tests {
920920
panic!("Error when creating file for test.\nError: {}", e);
921921
}
922922
};
923-
match f.write("Another file \\o/".as_bytes()) {
923+
match f.write_all("Another file \\o/".as_bytes()) {
924924
Ok(_) => {}
925925
Err(e) => {
926926
panic!("Error when writing to the test file.\nError: {}", e);
@@ -1019,7 +1019,7 @@ mod tests {
10191019
panic!("Error when creating file for test.\nError: {}", e);
10201020
}
10211021
};
1022-
match f.write("Test string\nIn test file".as_bytes()) {
1022+
match f.write_all("Test string\nIn test file".as_bytes()) {
10231023
Ok(_) => {}
10241024
Err(e) => {
10251025
panic!("Error when writing to the test file.\nError: {}", e);
@@ -1034,7 +1034,7 @@ mod tests {
10341034
panic!("Error when creating file for test.\nError: {}", e);
10351035
}
10361036
};
1037-
match f.write("Second file :3".as_bytes()) {
1037+
match f.write_all("Second file :3".as_bytes()) {
10381038
Ok(_) => {}
10391039
Err(e) => {
10401040
panic!("Error when writing to the test file.\nError: {}", e);
@@ -1060,7 +1060,7 @@ mod tests {
10601060
panic!("Error when rewriting file for test.\nError: {}", e);
10611061
}
10621062
};
1063-
match f.write("Modified file <3".as_bytes()) {
1063+
match f.write_all("Modified file <3".as_bytes()) {
10641064
Ok(_) => {}
10651065
Err(e) => {
10661066
panic!("Error when writing to the test file.\nError: {}", e);
@@ -1154,7 +1154,7 @@ mod tests {
11541154
panic!("Error when creating file for test.\nError: {}", e);
11551155
}
11561156
};
1157-
match f.write("Test string\nIn test file".as_bytes()) {
1157+
match f.write_all("Test string\nIn test file".as_bytes()) {
11581158
Ok(_) => {}
11591159
Err(e) => {
11601160
panic!("Error when writing to the test file.\nError: {}", e);
@@ -1177,7 +1177,7 @@ mod tests {
11771177
panic!("Error when creating file for test.\nError: {}", e);
11781178
}
11791179
};
1180-
match f.write("Second file :3".as_bytes()) {
1180+
match f.write_all("Second file :3".as_bytes()) {
11811181
Ok(_) => {}
11821182
Err(e) => {
11831183
panic!("Error when writing to the test file.\nError: {}", e);
@@ -1200,7 +1200,7 @@ mod tests {
12001200
panic!("Error when creating file for test.\nError: {}", e);
12011201
}
12021202
};
1203-
match f.write("Another file \\o/".as_bytes()) {
1203+
match f.write_all("Another file \\o/".as_bytes()) {
12041204
Ok(_) => {}
12051205
Err(e) => {
12061206
panic!("Error when writing to the test file.\nError: {}", e);
@@ -1226,7 +1226,7 @@ mod tests {
12261226
panic!("Error when rewriting file for test.\nError: {}", e);
12271227
}
12281228
};
1229-
match f.write("Modified file <3".as_bytes()) {
1229+
match f.write_all("Modified file <3".as_bytes()) {
12301230
Ok(_) => {}
12311231
Err(e) => {
12321232
panic!("Error when writing to the test file.\nError: {}", e);

0 commit comments

Comments
 (0)