cargo-msrv 0.15.0

Find your minimum supported Rust version (MSRV)!
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::path::PathBuf;

use crate::config::Config;
use crate::errors::{CargoMSRVError, IoErrorSource, TResult};

pub fn crate_root_folder(config: &Config) -> TResult<PathBuf> {
    if let Some(path) = config.crate_path() {
        Ok(path.to_path_buf())
    } else {
        std::env::current_dir().map_err(|error| CargoMSRVError::Io {
            error,
            source: IoErrorSource::CurrentDir,
        })
    }
}