Skip to content

Commit

Permalink
fixed test crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Arteiii committed Apr 24, 2024
1 parent 7baec63 commit 9352112
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/menu/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,11 @@ impl Input {
///
/// # Example
///
/// ```
/// # use std::thread;
/// # use std::time::Duration;
/// use zenity::menu::input::{Input, Requirements};
///
/// # // spawn a new thread to run the input
/// # let input_thread = thread::spawn(|| {
/// // initialize the input
/// let input = Input::new("Name", Requirements::default()).start();
/// # });
/// # // wait for 5 seconds before joining the thread
/// # thread::sleep(Duration::from_secs(5));
/// # // assert true after waiting for 5 seconds
/// # assert!(true);
/// ```rust-ignore
/// use zenity::menu::input::{Input, Requirements};
///
/// // init and start directly
/// let input = Input::new("Name", Requirements::default()).start();
/// ```
pub fn start(&self) -> Box<String> {
let mut force: bool = false;
Expand Down

0 comments on commit 9352112

Please sign in to comment.