What does this program print?

from Cell and RefCell
Rust 1.98 beginner 2 min

What does this program print?

Rust
use std::cell::Cell;

fn main() {
    let phase = Cell::new(String::from("queued"));
    let old = phase.replace(String::from("running"));
    println!("{old} -> {}", phase.into_inner());
}
Open in playground
Report an error