Skip to content

Commit

Permalink
Add helpful intro text to the function example
Browse files Browse the repository at this point in the history
  • Loading branch information
murarth committed Sep 4, 2018
1 parent a22c25c commit fbcbcc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const DEMO_FN_SEQ: &str = "\x18d"; // Ctrl-X, d
fn main() -> io::Result<()> {
let interface = Interface::new("function-demo")?;

println!("This example demonstrates a custom function implementation.");
println!("Enter the sequence Ctrl-X, followed by 'd' to execute the function.");
println!();

interface.set_prompt("fn-demo> ")?;

interface.define_function("demo-function", Arc::new(DemoFunction));
Expand Down

0 comments on commit fbcbcc5

Please sign in to comment.