Initialise `AppState` with placeholder value

finchie
Nov 25, 2023, 7:53 AM
GHO2RSOCHVFVS5UQSOGZT53FGZIVR4YKWGRSCEY3TZC5H3WCNMJQC

Dependencies

  • [2] MIY7QPYK Refactor argument handling into a separate file
  • [3] G54GZBS4 Remove dependency on clap patches
  • [*] C73UJ7ZY Create simple `xilem_html` demo
  • [*] REI53XR4 Render argument state as HTML
  • [*] ALCCL4VK Create basic styling

Change contents

  • edit in src/main.rs at line 18
    [3.288]
    [3.288]
    // Initialise with placeholder values for debugging
    let input = String::from("pijul --name hi two --amount 5");
    let command = MockApp::command();
    let arg_matches = command
    .clone()
    .try_get_matches_from(input.clone().split_ascii_whitespace());
  • replacement in src/main.rs at line 26
    [3.303][2.198:273](),[2.273][3.339:425](),[3.339][3.339:425]()
    input: String::new(),
    command: MockApp::command(),
    arg_matches: Err(clap::Error::new(clap::error::ErrorKind::TooFewValues)),
    [3.303]
    [3.425]
    input,
    command,
    arg_matches,
  • edit in src/main.rs at line 48
    [5.773]
    [6.1798]
    .attr("value", state.input.clone())
  • edit in index.html at line 23
    [7.626]
    [7.626]
    width: 40%;