2018 style imports

pull/6/head
dvkt 4 years ago
parent 5a3d29307f
commit d11c0f0a6d

@ -1,8 +1,8 @@
use crate::gopher;
use std::fs::{File, OpenOptions};
use std::io::prelude::*;
use std::io::{BufReader, Result, Write};
use std::{
fs::{File, OpenOptions},
io::{prelude::*, BufReader, Result, Write},
};
pub const DIR: &str = "~/.config/phetch/";

@ -1,8 +1,10 @@
use std::io::{Read, Result, Write};
use std::net::TcpStream;
use std::net::ToSocketAddrs;
use std::os::unix::fs::OpenOptionsExt;
use std::time::Duration;
use std::{
io::{Read, Result, Write},
net::TcpStream,
net::ToSocketAddrs,
os::unix::fs::OpenOptionsExt,
time::Duration,
};
use termion::input::TermRead;
// Some Gopher servers can be kind of slow, we may want to up this or

@ -1,5 +1,4 @@
use crate::bookmarks;
use crate::history;
use crate::{bookmarks, history};
pub fn lookup(name: &str) -> Option<String> {
Some(match name {

@ -1,7 +1,6 @@
extern crate phetch;
use phetch::gopher;
use phetch::ui::UI;
use phetch::{gopher, ui::UI};
use std::process::exit;
fn main() {

@ -1,10 +1,9 @@
use crate::gopher;
use crate::gopher::Type;
use crate::gopher::{self, Type};
use crate::ui::{Action, Key, View, MAX_COLS, SCROLL_LINES};
use std::fmt;
use std::io::stdout;
use std::io::Write;
use termion::color;
use std::{
fmt,
io::{stdout, Write},
};
pub struct Menu {
pub url: String, // gopher url

@ -3,24 +3,23 @@ mod view;
pub use self::action::Action;
pub use self::view::View;
use crate::bookmarks;
use crate::gopher;
use crate::gopher::Type;
use crate::help;
use crate::history;
use crate::menu::Menu;
use crate::text::Text;
use crate::utils;
use std::io::{stdin, stdout, Result, Write};
use std::process;
use std::process::Stdio;
use std::sync::mpsc;
use std::thread;
use std::time::Duration;
use termion::color;
use termion::input::TermRead;
use termion::raw::IntoRawMode;
use termion::terminal_size;
use crate::{
bookmarks,
gopher::{self, Type},
help, history,
menu::Menu,
text::Text,
utils,
};
use std::{
io::{stdin, stdout, Result, Write},
process,
process::Stdio,
sync::mpsc,
thread,
time::Duration,
};
use termion::{color, input::TermRead, raw::IntoRawMode, terminal_size};
pub type Key = termion::event::Key;
pub type Page = Box<dyn View>;

Loading…
Cancel
Save