Bump Rust to 2021 edition
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pixelpwnr"
|
name = "pixelpwnr"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
authors = ["Tim Visée <timvisee@gmail.com>"]
|
authors = ["Tim Visée <timvisee@gmail.com>"]
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
extern crate clap;
|
|
||||||
extern crate num_cpus;
|
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
|
|||||||
@@ -3,12 +3,10 @@ use std::path::Path;
|
|||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use image;
|
use crate::pix::canvas::Canvas;
|
||||||
use image::imageops::FilterType;
|
use image::imageops::FilterType;
|
||||||
use image::DynamicImage;
|
use image::DynamicImage;
|
||||||
|
|
||||||
use pix::canvas::Canvas;
|
|
||||||
|
|
||||||
/// A manager that manages all images to print.
|
/// A manager that manages all images to print.
|
||||||
pub struct ImageManager {
|
pub struct ImageManager {
|
||||||
images: Vec<DynamicImage>,
|
images: Vec<DynamicImage>,
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
extern crate clap;
|
|
||||||
extern crate image;
|
|
||||||
extern crate rayon;
|
|
||||||
|
|
||||||
mod arg_handler;
|
mod arg_handler;
|
||||||
mod color;
|
mod color;
|
||||||
mod image_manager;
|
mod image_manager;
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
extern crate image;
|
|
||||||
|
|
||||||
use std::sync::mpsc::Sender;
|
use std::sync::mpsc::Sender;
|
||||||
use std::thread::JoinHandle;
|
use std::thread::JoinHandle;
|
||||||
|
|
||||||
use image::DynamicImage;
|
use image::DynamicImage;
|
||||||
|
|
||||||
use rect::Rect;
|
use crate::rect::Rect;
|
||||||
|
|
||||||
/// A handle to a painter thread.
|
/// A handle to a painter thread.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ use std::sync::mpsc::Receiver;
|
|||||||
|
|
||||||
use image::{DynamicImage, Pixel};
|
use image::{DynamicImage, Pixel};
|
||||||
|
|
||||||
use color::Color;
|
use crate::color::Color;
|
||||||
use pix::client::Client;
|
use crate::pix::client::Client;
|
||||||
use rect::Rect;
|
use crate::rect::Rect;
|
||||||
|
|
||||||
/// A painter that paints on a pixelflut panel.
|
/// A painter that paints on a pixelflut panel.
|
||||||
pub struct Painter {
|
pub struct Painter {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ use std::time::Duration;
|
|||||||
|
|
||||||
use image::DynamicImage;
|
use image::DynamicImage;
|
||||||
|
|
||||||
use painter::handle::Handle;
|
use crate::painter::handle::Handle;
|
||||||
use painter::painter::Painter;
|
use crate::painter::painter::Painter;
|
||||||
use pix::client::Client;
|
use crate::pix::client::Client;
|
||||||
use rect::Rect;
|
use crate::rect::Rect;
|
||||||
|
|
||||||
/// A pixflut instance
|
/// A pixflut instance
|
||||||
pub struct Canvas {
|
pub struct Canvas {
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
extern crate bufstream;
|
|
||||||
extern crate regex;
|
|
||||||
|
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::io::{Error, ErrorKind};
|
use std::io::{Error, ErrorKind};
|
||||||
use std::net::TcpStream;
|
use std::net::TcpStream;
|
||||||
|
|
||||||
use self::bufstream::BufStream;
|
use bufstream::BufStream;
|
||||||
use self::regex::Regex;
|
use regex::Regex;
|
||||||
|
|
||||||
use color::Color;
|
use crate::color::Color;
|
||||||
|
|
||||||
// The default buffer size for reading the client stream.
|
// The default buffer size for reading the client stream.
|
||||||
// - Big enough so we don't have to expand
|
// - Big enough so we don't have to expand
|
||||||
|
|||||||
Reference in New Issue
Block a user