fn visit_files(entry: &DirEntry, channel: &GuildChannel) {
  println!("Working on : {:?}", entry.path());
  let path: String = entry.path().to_str().unwrap().to_string();
  let vec: Vec<Message> = Vec::new();
  let file = files::build(path.to_owned(), vec);
  for x in file.stored {
    if x.text != "" {
      let mut actual = 0;
      let mut len = x.text.len();
      while len != 0 {
        let mut c_number: usize = if len > 1500 { 1500 } else { len };
        channel
          .say(&format!(
            "**{}**: {}",
            &x.user,
            &x.text[actual..actual + c_number]
          ))
          .unwrap();
        len -= c_number;
        actual += c_number;
      }
    }
  }
}
/// Read and parse the files, output the found messages, to the discord associated channel
Read and parse the files, output the found messages, to the discord associated channel
Read and parse the files output the found messages to the discord associated channel
fn visit_files(entry: &DirEntry, channel: &GuildChannel) {
  println!("Working on : {:?}", entry.path());
  let path: String = entry.path().to_str().unwrap().to_string();
  let vec: Vec<Message> = Vec::new();
  let file = files::build(path.to_owned(), vec);
  for x in file.stored {
    if x.text != "" {
      let mut actual = 0;
      let mut len = x.text.len();
      while len != 0 {
        let mut c_number: usize = if len > 1500 { 1500 } else { len };
        channel
          .say(&format!(
            "**{}**: {}",
            &x.user,
            &x.text[actual..actual + c_number]
          ))
          .unwrap();
        len -= c_number;
        actual += c_number;
      }
    }
  }
}
fn visit_files ( entry : & DirEntry , channel : & GuildChannel ) { println ! ( " " entry path ( ) ) ; let path : String = entry . path ( ) . to_str ( ) . unwrap ( ) . to_string ( ) ; let vec : Vec < Message > = Vec :: new ( ) ; let file = files :: build ( path . to_owned ( ) , vec ) ; for x in file . stored { if x . text != " " { let mut actual = 0 ; let mut len = x . text . len ( ) ; while len != 0 { let mut c_number : usize = if len > 1500 { 1500 } else { len } ; channel . say ( & format ! ( " " x user x text [ actual actual c_number ] ) ) . unwrap ( ) ; len -= c_number ; actual += c_number ; } } } }
Read and parse the files, output the found messages, to the discord associated channel
Read and parse the files output the found messages to the discord associated channel
entry
&DirEntry
channel
&GuildChannel
entry
&DirEntry
channel
&GuildChannel