ref-method and command merge #4

Merged
Mitch161 merged 39 commits from cmd--optimization into master 2020-08-19 21:29:44 +00:00
4 changed files with 11 additions and 9 deletions
Showing only changes of commit 164542a56b - Show all commits

View File

@ -87,9 +87,9 @@ fn Control_Panel() -> ResizedView<Panel<LinearLayout>> {
left.add_child(TextView::new("Hello world"));
root.add_child(left);
root.add_child(right);
ResizedView::new(SizeConstraint::AtLeast(32), SizeConstraint::AtLeast(32), Panel::new(root))
root.add_child(ResizedView::new(SizeConstraint::Full, SizeConstraint::Full, Panel::new(left)));
root.add_child(ResizedView::new(SizeConstraint::Full, SizeConstraint::Full, Panel::new(right)));
ResizedView::new(SizeConstraint::Fixed(64), SizeConstraint::Fixed(20), Panel::new(root))
}
// MARK: - general testing zone

View File

@ -10,8 +10,9 @@ use crossbeam::{Sender, Receiver, TryRecvError, unbounded};
use crate::{
server::{
server_profile::ServerMessages,
commands::Commands
}
},
commands::Commands
};
use std::sync::Mutex;
use std::time::Duration;

View File

@ -203,8 +203,8 @@ impl From<String> for Commands {
impl From<&[u8]> for Commands {
fn from(data: &[u8]) -> Self {
let incoming_message = String::from(String::from_utf8_lossy(data)).as_str();
Commands::from(incoming_message)
let incoming_message = String::from(String::from_utf8_lossy(data));
Commands::from(incoming_message.as_str())
}
}

View File

@ -4,8 +4,9 @@ extern crate rayon;
use crate::{
server::{
client::client_profile::Client,
commands::{Commands}
}
},
commands::Commands
};
use std::{
sync::{Arc, Mutex},