mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
Replace Rank::none() with Rank::NONE
This commit is contained in:
parent
cc874f347f
commit
f04d8f5b03
2 changed files with 5 additions and 7 deletions
|
@ -305,7 +305,7 @@ fn solve(
|
|||
// check that things went well
|
||||
debug_assert!(rigid_vars
|
||||
.iter()
|
||||
.all(|&var| subs.get_without_compacting(var).rank == Rank::none()));
|
||||
.all(|&var| subs.get_without_compacting(var).rank == Rank::NONE));
|
||||
|
||||
let mut new_vars_by_symbol = vars_by_symbol.clone();
|
||||
|
||||
|
@ -500,7 +500,7 @@ fn generalize(
|
|||
if desc.rank < young_rank {
|
||||
pools.get_mut(desc.rank).push(var);
|
||||
} else {
|
||||
desc.rank = Rank::none();
|
||||
desc.rank = Rank::NONE;
|
||||
|
||||
subs.set(var, desc);
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ impl Subs {
|
|||
var,
|
||||
Descriptor {
|
||||
content: content.clone(),
|
||||
rank: Rank::none(),
|
||||
rank: Rank::NONE,
|
||||
mark: Mark::none(),
|
||||
copy: None,
|
||||
},
|
||||
|
@ -275,9 +275,7 @@ fn unnamed_flex_var() -> Content {
|
|||
pub struct Rank(usize);
|
||||
|
||||
impl Rank {
|
||||
pub fn none() -> Self {
|
||||
Rank(0)
|
||||
}
|
||||
pub const NONE: Rank = Rank(0);
|
||||
|
||||
pub fn toplevel() -> Self {
|
||||
Rank(1)
|
||||
|
@ -344,7 +342,7 @@ impl From<Content> for Descriptor {
|
|||
fn from(content: Content) -> Descriptor {
|
||||
Descriptor {
|
||||
content,
|
||||
rank: Rank::none(),
|
||||
rank: Rank::NONE,
|
||||
mark: Mark::none(),
|
||||
copy: None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue