Skip to content

Commit 4bb0142

Browse files
fixes
1 parent b495c0b commit 4bb0142

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/set_cost.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct EnableCostsDeclarations;
139139
/// Use (enable-dynamic-cost <function name>) to retroactively enable dynamic costs for a function.
140140
/// Will error if the function has dynamic cost already activated.
141141
impl UserDefinedCommand for EnableCostsDeclarations {
142-
fn update(&self, egraph: &mut EGraph, args: &[Expr]) -> Result<(), Error> {
142+
fn update(&self, egraph: &mut EGraph, args: &[Expr]) -> Result<Option<CommandOutput>, Error> {
143143
let span = args[0].span();
144144
if let [GenericExpr::Var(_, name)] = args {
145145
let function = egraph.get_function(name).ok_or_else(|| {
@@ -155,7 +155,7 @@ impl UserDefinedCommand for EnableCostsDeclarations {
155155
.map(|s| s.name().to_string())
156156
.collect();
157157
egraph.run_program(vec![generate_cost_command(span, name, input_sorts)])?;
158-
return Ok(());
158+
return Ok(None);
159159
}
160160
Err(Error::ParseError(ParseError(
161161
span,

0 commit comments

Comments
 (0)