Repository: diesel-rs/diesel (language: rust)

Issue:
RUSTSEC-2021-0139: ansi_term is Unmaintained

> ansi_term is Unmaintained

| Details             |                                                |
| ------------------- | ---------------------------------------------- |
| Status              | unmaintained                |
| Package             | `ansi_term`                      |
| Version             | `0.12.1`                   |
| URL                 | [https://github.com/ogham/rust-ansi-term/issues/72](https://github.com/ogham/rust-ansi-term/issues/72) |
| Date                | 2021-08-18                         |

The maintainer has adviced this crate is deprecated and will not
receive any maintenance.

The crate does not seem to have much dependencies and may or may not be ok to use as-is.

Last release seems to have been three years ago.

## Possible Alternative(s)

 The below list has not been vetted in any way and may or may not contain alternatives;

 - [anstyle](https://github.com/epage/anstyle)
 - [console](https://crates.io/crates/console)
 - [nu-ansi-term](https://crates.io/crates/nu-ansi-term)
 - [yansi](https://crates.io/crates/yansi)

See [advisory page](https://rustsec.org/advisories/RUSTSEC-2021-0139.html) for additional details.



Discussion / hints:

Fix patch:
diff --git a/diesel/src/migration/mod.rs b/diesel/src/migration/mod.rs
index afd631c2786d..735aaf42ab3a 100644
--- a/diesel/src/migration/mod.rs
+++ b/diesel/src/migration/mod.rs
@@ -142,37 +142,37 @@ pub trait MigrationSource<DB: Backend> {
 
 impl<'a, DB: Backend> Migration<DB> for Box<dyn Migration<DB> + 'a> {
     fn run(&self, conn: &mut dyn BoxableConnection<DB>) -> Result<()> {
-        (&**self).run(conn)
+        (**self).run(conn)
     }
 
     fn revert(&self, conn: &mut dyn BoxableConnection<DB>) -> Result<()> {
-        (&**self).revert(conn)
+        (**self).revert(conn)
     }
 
     fn metadata(&self) -> &dyn MigrationMetadata {
-        (&**self).metadata()
+        (**self).metadata()
     }
 
     fn name(&self) -> &dyn MigrationName {
-        (&**self).name()
+        (**self).name()
     }
 }
 
 impl<'a, DB: Backend> Migration<DB> for &'a dyn Migration<DB> {
     fn run(&self, conn: &mut dyn BoxableConnection<DB>) -> Result<()> {
-        (&**self).run(conn)
+        (**self).run(conn)
     }
 
     fn revert(&self, conn: &mut dyn BoxableConnection<DB>) -> Result<()> {
-        (&**self).revert(conn)
+        (**self).revert(conn)
     }
 
     fn metadata(&self) -> &dyn MigrationMetadata {
-        (&**self).metadata()
+        (**self).metadata()
     }
 
     fn name(&self) -> &dyn MigrationName {
-        (&**self).name()
+        (**self).name()
     }
 }
 
diff --git a/diesel_cli/Cargo.toml b/diesel_cli/Cargo.toml
index ed7e2ceded05..0c0ad1758e8f 100644
--- a/diesel_cli/Cargo.toml
+++ b/diesel_cli/Cargo.toml
@@ -28,7 +28,7 @@ serde = { version = "1.0.0", features = ["derive"] }
 toml = "0.5"
 url = { version = "2.2.2" }
 libsqlite3-sys = { version = ">=0.17.2, <0.26.0", optional = true }
-diffy = "0.2.0"
+diffy = "0.3.0"
 regex = "1.0.6"
 serde_regex = "1.1"
 
diff --git a/rust-toolchain b/rust-toolchain
index af92bdd9f58d..9405730420ff 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1,1 +1,1 @@
-1.63.0
+1.64.0


Test patch: