Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
nix: rust-1.62
Browse files Browse the repository at this point in the history
Update to rust-1.62.0[0]. This requires converting `push_str` +
`format!` calls into a `write!` call.

Remove `license_template_path` since it is deprecated[1].

[0]: https://blog.rust-lang.org/2022/06/30/Rust-1.62.0.html
[1]: rust-lang/rustfmt#5246

Signed-off-by: Fintan Halpenny <[email protected]>
  • Loading branch information
FintanH committed Jul 11, 2022
1 parent bd2556d commit b85d218
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ use_field_init_shorthand = false

force_explicit_abi = true

license_template_path = ".license-header"
12 changes: 6 additions & 6 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f96729212602f15a6a226d2f27f5de70492ad095",
"sha256": "1l9y427cirmdjbf0wxhhk09yg6wmk1844xa5gvzw16xm2p3wfgjq",
"rev": "573603b7fdb9feb0eb8efc16ee18a015c667ab1b",
"sha256": "1z7mxyw5yk1gcsjs5wl8zm4klxg4xngljgrsnpl579l998205qym",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/f96729212602f15a6a226d2f27f5de70492ad095.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/573603b7fdb9feb0eb8efc16ee18a015c667ab1b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"rust-overlay": {
Expand All @@ -29,10 +29,10 @@
"homepage": "",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "9eea93067eff400846c36f57b7499df9ef428ba0",
"sha256": "0vbjld45m6ig19i5zcwlv86m09dnq8msf072s3j3bc6kym2aiy4m",
"rev": "1a133f54a0229af8310879eac2c4a82c0576a0b9",
"sha256": "0hab9wfr3shcb4z508gjc3y9slnxdjhfnmqhpvrkx4v2gq7pkm8n",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/9eea93067eff400846c36f57b7499df9ef428ba0.tar.gz",
"url": "https://github.com/oxalica/rust-overlay/archive/1a133f54a0229af8310879eac2c4a82c0576a0b9.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
4 changes: 3 additions & 1 deletion surf/src/file_system/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

use std::fmt::Write as _;

use crate::{file_system::error, nonempty::split_last};
use nonempty::NonEmpty;
use std::{convert::TryFrom, ffi::CString, fmt, ops::Deref, path, str::FromStr};
Expand Down Expand Up @@ -178,7 +180,7 @@ impl git2::IntoCString for Path {
// `git2::DiffOptions::pathspec` to work properly. As far as we're aware this is
// the only use of IntoCString for Path.
let label = p.label.replace('\\', "\\\\");
pathspec.push_str(&format!("{}/", label));
let _ = write!(pathspec, "{label}/");
}
let pathspec = pathspec.trim_end_matches('/');
pathspec.into_c_string()
Expand Down
4 changes: 2 additions & 2 deletions surf/src/vcs/git/reference/glob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
vcs::git::{error, repo::RepositoryRef},
};
use either::Either;
use std::fmt;
use std::fmt::{self, Write as _};

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum RefGlob {
Expand Down Expand Up @@ -103,7 +103,7 @@ impl RefGlob {
) -> Result<References<'a>, error::Error> {
let mut namespace_glob = "".to_string();
for n in namespace {
namespace_glob.push_str(&format!("refs/namespaces/{}/", n));
let _ = write!(namespace_glob, "refs/namespaces/{n}/");
}

Ok(match self {
Expand Down

0 comments on commit b85d218

Please sign in to comment.