File: update-deps

package info (click to toggle)
rust-wu-diff 0.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 224 kB
  • sloc: makefile: 7
file content (65 lines) | stat: -rw-r--r-- 1,907 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Index: wu-diff/Cargo.toml
===================================================================
--- wu-diff.orig/Cargo.toml
+++ wu-diff/Cargo.toml
@@ -23,14 +23,11 @@ repository = "https://github.com/bokuweb
 [[bench]]
 name = "benches"
 harness = false
-[dependencies.clippy]
-version = "0.0.209"
-optional = true
 [dev-dependencies.base64]
-version = "0.9.0"
+version = "0.21"
 
 [dev-dependencies.criterion]
-version = "0.2"
+version = "0.5"
 
 [dev-dependencies.image]
-version = "0.18.0"
+version = "0.24"
Index: wu-diff/tests/lib.rs
===================================================================
--- wu-diff.orig/tests/lib.rs
+++ wu-diff/tests/lib.rs
@@ -1,4 +1,3 @@
-#![feature(extern_prelude)]
 extern crate base64;
 extern crate image;
 extern crate wu_diff;
@@ -6,7 +5,8 @@ extern crate wu_diff;
 #[cfg(test)]
 mod tests {
 
-    use base64::encode;
+    use base64::engine::general_purpose::STANDARD;
+    use base64::engine::Engine;
     use image::*;
     use wu_diff::*;
 
@@ -19,8 +19,8 @@ mod tests {
         let mut removed_indexes: Vec<usize> = Vec::new();
         for d in diff.iter() {
             match d {
-                &DiffResult::Added(ref a) => added_indexes.push(a.new_index.unwrap()),
-                &DiffResult::Removed(ref r) => removed_indexes.push(r.old_index.unwrap()),
+                DiffResult::Added(a) => added_indexes.push(a.new_index.unwrap()),
+                DiffResult::Removed(r) => removed_indexes.push(r.old_index.unwrap()),
                 _ => (),
             }
         }
@@ -37,9 +37,10 @@ mod tests {
 
     fn create_encoded_rows(image: &DynamicImage) -> Vec<String> {
         image
-            .raw_pixels()
+            .as_bytes()
+            .to_vec()
             .chunks(image.dimensions().0 as usize * 4)
-            .map(|chunk| encode(chunk))
+            .map(|chunk| STANDARD.encode(chunk))
             .collect()
     }
 }