mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-02-21 18:49:04 +01:00
refactor: Namespace::resolve* -> Namespace::namespace*
This commit is contained in:
parent
04db6f4af5
commit
7a8365c017
2 changed files with 16 additions and 16 deletions
|
|
@ -189,12 +189,12 @@ pub fn evaluate_output_expression <'a, O: Out + 'a, S> (
|
|||
match frags.next() {
|
||||
|
||||
Some("when") => output.place(&When::new(
|
||||
state.resolve(arg0?)?.unwrap(),
|
||||
state.namespace(arg0?)?.unwrap(),
|
||||
Thunk::new(move|output: &mut O|state.view(output, &arg1).unwrap())
|
||||
)),
|
||||
|
||||
Some("either") => output.place(&Either::new(
|
||||
state.resolve(arg0?)?.unwrap(),
|
||||
state.namespace(arg0?)?.unwrap(),
|
||||
Thunk::new(move|output: &mut O|state.view(output, &arg1).unwrap()),
|
||||
Thunk::new(move|output: &mut O|state.view(output, &arg2).unwrap())
|
||||
)),
|
||||
|
|
@ -242,9 +242,9 @@ pub fn evaluate_output_expression <'a, O: Out + 'a, S> (
|
|||
let arg = match axis { Some("x") | Some("y") => arg1, Some("xy") | None => arg2, _ => panic!("fixed: unsupported axis {axis:?}") };
|
||||
let cb = Thunk::new(move|output: &mut O|state.view(output, &arg).unwrap());
|
||||
match axis {
|
||||
Some("xy") | None => Fixed::XY(state.resolve(arg0?)?.unwrap(), state.resolve(arg1?)?.unwrap(), cb),
|
||||
Some("x") => Fixed::X(state.resolve(arg0?)?.unwrap(), cb),
|
||||
Some("y") => Fixed::Y(state.resolve(arg0?)?.unwrap(), cb),
|
||||
Some("xy") | None => Fixed::XY(state.namespace(arg0?)?.unwrap(), state.namespace(arg1?)?.unwrap(), cb),
|
||||
Some("x") => Fixed::X(state.namespace(arg0?)?.unwrap(), cb),
|
||||
Some("y") => Fixed::Y(state.namespace(arg0?)?.unwrap(), cb),
|
||||
frag => unimplemented!("fixed/{frag:?} ({expr:?}) ({head:?}) ({:?})",
|
||||
head.src()?.unwrap_or_default().split("/").next())
|
||||
}
|
||||
|
|
@ -255,9 +255,9 @@ pub fn evaluate_output_expression <'a, O: Out + 'a, S> (
|
|||
let arg = match axis { Some("x") | Some("y") => arg1, Some("xy") | None => arg2, _ => panic!("fixed: unsupported axis {axis:?}") };
|
||||
let cb = Thunk::new(move|output: &mut O|state.view(output, &arg).unwrap());
|
||||
match axis {
|
||||
Some("xy") | None => Min::XY(state.resolve(arg0?)?.unwrap(), state.resolve(arg1?)?.unwrap(), cb),
|
||||
Some("x") => Min::X(state.resolve(arg0?)?.unwrap(), cb),
|
||||
Some("y") => Min::Y(state.resolve(arg0?)?.unwrap(), cb),
|
||||
Some("xy") | None => Min::XY(state.namespace(arg0?)?.unwrap(), state.namespace(arg1?)?.unwrap(), cb),
|
||||
Some("x") => Min::X(state.namespace(arg0?)?.unwrap(), cb),
|
||||
Some("y") => Min::Y(state.namespace(arg0?)?.unwrap(), cb),
|
||||
frag => unimplemented!("min/{frag:?}")
|
||||
}
|
||||
}),
|
||||
|
|
@ -267,9 +267,9 @@ pub fn evaluate_output_expression <'a, O: Out + 'a, S> (
|
|||
let arg = match axis { Some("x") | Some("y") => arg1, Some("xy") | None => arg2, _ => panic!("fixed: unsupported axis {axis:?}") };
|
||||
let cb = Thunk::new(move|output: &mut O|state.view(output, &arg).unwrap());
|
||||
match axis {
|
||||
Some("xy") | None => Max::XY(state.resolve(arg0?)?.unwrap(), state.resolve(arg1?)?.unwrap(), cb),
|
||||
Some("x") => Max::X(state.resolve(arg0?)?.unwrap(), cb),
|
||||
Some("y") => Max::Y(state.resolve(arg0?)?.unwrap(), cb),
|
||||
Some("xy") | None => Max::XY(state.namespace(arg0?)?.unwrap(), state.namespace(arg1?)?.unwrap(), cb),
|
||||
Some("x") => Max::X(state.namespace(arg0?)?.unwrap(), cb),
|
||||
Some("y") => Max::Y(state.namespace(arg0?)?.unwrap(), cb),
|
||||
frag => unimplemented!("max/{frag:?}")
|
||||
}
|
||||
}),
|
||||
|
|
@ -279,9 +279,9 @@ pub fn evaluate_output_expression <'a, O: Out + 'a, S> (
|
|||
let arg = match axis { Some("x") | Some("y") => arg1, Some("xy") | None => arg2, _ => panic!("fixed: unsupported axis {axis:?}") };
|
||||
let cb = Thunk::new(move|output: &mut O|state.view(output, &arg).unwrap());
|
||||
match axis {
|
||||
Some("xy") | None => Push::XY(state.resolve(arg0?)?.unwrap(), state.resolve(arg1?)?.unwrap(), cb),
|
||||
Some("x") => Push::X(state.resolve(arg0?)?.unwrap(), cb),
|
||||
Some("y") => Push::Y(state.resolve(arg0?)?.unwrap(), cb),
|
||||
Some("xy") | None => Push::XY(state.namespace(arg0?)?.unwrap(), state.namespace(arg1?)?.unwrap(), cb),
|
||||
Some("x") => Push::X(state.namespace(arg0?)?.unwrap(), cb),
|
||||
Some("y") => Push::Y(state.namespace(arg0?)?.unwrap(), cb),
|
||||
frag => unimplemented!("push/{frag:?}")
|
||||
}
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue