Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tools/mdbook-spec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ impl Spec {
/// Determines the git ref used for linking to a particular branch/tag in GitHub.
fn git_ref(rust_root: &Option<PathBuf>) -> Result<String> {
let Some(rust_root) = rust_root else {
return Ok("master".into());
return Ok("main".into());
};
let channel = std::fs::read_to_string(rust_root.join("src/ci/channel"))
.context("failed to read src/ci/channel")?;
let git_ref = match channel.trim() {
// nightly/beta are branches, not stable references. Should be ok
// because we're not expecting those channels to be long-lived.
"nightly" => "master".into(),
"nightly" => "main".into(),
"beta" => "beta".into(),
"stable" => {
let version = std::fs::read_to_string(rust_root.join("src/version"))
Expand Down Expand Up @@ -155,7 +155,7 @@ impl Preprocessor for Spec {
Ok(s) => s,
Err(e) => {
warn_or_err!(&mut diag, "{e:?}");
"master".into()
"main".into()
}
};

Expand Down