replace ~ with .to_owned() and box