Skip to content

Commit

Permalink
Update the rust toolchain to 1.75 (#1857)
Browse files Browse the repository at this point in the history
A recent MSRV bump in `clap` and `normpath` requires us to use rustc
1.74 or above.
  • Loading branch information
o0Ignition0o authored Feb 20, 2024
1 parent 21036f2 commit ada2ecb
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 25 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.73.0"
channel = "1.75.0"
components = [ "rustfmt", "clippy" ]
3 changes: 0 additions & 3 deletions src/command/contract/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
mod describe;
mod publish;

pub use describe::Describe;
pub use publish::Publish;

use clap::Parser;
use serde::Serialize;

Expand Down
8 changes: 1 addition & 7 deletions src/command/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@ mod introspect;
mod lint;
mod publish;

pub use check::Check;
pub use delete::Delete;
pub use fetch::Fetch;
pub use introspect::Introspect;
pub use lint::Lint;
pub use publish::Publish;

use clap::Parser;
pub use introspect::Introspect;
use serde::Serialize;

use crate::options::OutputOpts;
Expand Down
6 changes: 0 additions & 6 deletions src/command/subgraph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ mod lint;
mod list;
mod publish;

pub use check::Check;
pub use delete::Delete;
pub use fetch::Fetch;
pub use introspect::Introspect;
pub use lint::Lint;
pub use list::List;
pub use publish::Publish;

use clap::Parser;
use serde::Serialize;
Expand Down
2 changes: 1 addition & 1 deletion src/command/subgraph/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl Publish {

#[cfg(test)]
mod tests {
use crate::command::subgraph::Publish;
use crate::command::subgraph::publish::Publish;

#[test]
fn test_no_url() {
Expand Down
4 changes: 1 addition & 3 deletions xtask/src/commands/prep/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use anyhow::{anyhow, Context, Result};
use camino::Utf8PathBuf;
use rover_std::Fs;

use std::convert::TryFrom;

use crate::utils::PKG_PROJECT_ROOT;

pub(crate) struct DocsRunner {
Expand Down Expand Up @@ -51,7 +49,7 @@ impl DocsRunner {
// and add it as a header. Then push the header and description to the
// all_descriptions string
for code in code_files {
let path = Utf8PathBuf::try_from(code.path())?;
let path = Utf8PathBuf::from(code.path());

let contents = Fs::read_file(&path)?;
let code_name = path
Expand Down
7 changes: 3 additions & 4 deletions xtask/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use anyhow::{anyhow, Context, Result};
use anyhow::{anyhow, Result};
use camino::Utf8PathBuf;
use cargo_metadata::{Metadata, MetadataCommand};
use lazy_static::lazy_static;

use std::{convert::TryFrom, env, str};
use std::{env, str};

const MANIFEST_DIR: &str = env!("CARGO_MANIFEST_DIR");
#[allow(dead_code)]
Expand Down Expand Up @@ -37,8 +37,7 @@ fn rover_version() -> Result<String> {
}

fn project_root() -> Result<Utf8PathBuf> {
let manifest_dir = Utf8PathBuf::try_from(MANIFEST_DIR)
.with_context(|| "Could not find the root directory.")?;
let manifest_dir = Utf8PathBuf::from(MANIFEST_DIR);
let root_dir = manifest_dir
.ancestors()
.nth(1)
Expand Down

0 comments on commit ada2ecb

Please sign in to comment.