From 4379cb66a981a37e63a950175048d033350bffb8 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sun, 25 Dec 2022 18:56:01 -0500 Subject: [PATCH] Commit old changes --- build.earth | 8 +++++++- src/calc/entries.rs | 2 +- src/calc/entries/matrix.rs | 1 - src/calc/entries/number.rs | 2 +- src/calc/entries/vector.rs | 1 - src/main.rs | 1 + 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build.earth b/build.earth index c312a86..f11a2a2 100644 --- a/build.earth +++ b/build.earth @@ -13,13 +13,18 @@ deps: rust-builder: RUN rustup target add x86_64-unknown-linux-musl RUN rustup target add x86_64-pc-windows-gnu + RUN rustup target add i686-pc-windows-gnu RUN rustup target add i686-unknown-linux-musl RUN rustup target add aarch64-unknown-linux-musl RUN rustup target add arm-unknown-linux-musleabi RUN rustup target add armv7-unknown-linux-musleabi + RUN rustup target add i686-pc-windows-gnu + RUN rustup target add x86_64-unknown-linux-musl + RUN rustup target add i686-unknown-linux-musl + RUN apt-get update - RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu gdb-mingw-w64 gcc-mingw-w64-x86-64 + RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu gdb-mingw-w64 gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 SAVE IMAGE docker-wg:5000/rust-builder @@ -46,3 +51,4 @@ all: BUILD --build-arg TOOLCHAIN=arm-unknown-linux-musleabi --build-arg STRIP_CMD=arm-linux-gnueabi-strip +build BUILD --build-arg TOOLCHAIN=armv7-unknown-linux-musleabi --build-arg STRIP_CMD=arm-linux-gnueabi-strip +build BUILD --build-arg TOOLCHAIN=x86_64-pc-windows-gnu --build-arg STRIP_CMD= --build-arg EXT=.exe +build + BUILD --build-arg TOOLCHAIN=i686-pc-windows-gnu --build-arg STRIP_CMD= --build-arg EXT=.exe +build diff --git a/src/calc/entries.rs b/src/calc/entries.rs index 2ba5666..d20d35f 100644 --- a/src/calc/entries.rs +++ b/src/calc/entries.rs @@ -3,7 +3,7 @@ mod matrix; mod number; mod vector; -use super::errors::{CalculatorError, CalculatorResult}; +use super::errors::CalculatorResult; use crate::calc::{types::CalculatorAngleMode, CalculatorDisplayMode}; pub use matrix::{Matrix, MatrixDimensions}; pub use number::Number; diff --git a/src/calc/entries/matrix.rs b/src/calc/entries/matrix.rs index 4c4a49f..0eda68f 100644 --- a/src/calc/entries/matrix.rs +++ b/src/calc/entries/matrix.rs @@ -145,7 +145,6 @@ impl Matrix { impl CalculatorEntry for Matrix { fn to_editable_string(&self) -> CalculatorResult { - // TODO: Eventualy we can parse and edit a matrix as a string Err(CalculatorError::TypeMismatch) } fn is_valid(&self) -> bool { diff --git a/src/calc/entries/number.rs b/src/calc/entries/number.rs index 1fa765f..586f8d5 100644 --- a/src/calc/entries/number.rs +++ b/src/calc/entries/number.rs @@ -1,4 +1,4 @@ -use super::{Entry, Matrix, Vector, VectorDirection}; +use super::{Entry, Matrix, Vector}; use crate::{ calc::{ errors::{CalculatorError, CalculatorResult}, diff --git a/src/calc/entries/vector.rs b/src/calc/entries/vector.rs index a8d18ad..1f3fb40 100644 --- a/src/calc/entries/vector.rs +++ b/src/calc/entries/vector.rs @@ -154,7 +154,6 @@ impl CalculatorEntry for Vector { }) } (VectorDirection::Column, VectorDirection::Row) => { - // TODO: Do we need to clone? Matrix::from(&[Entry::Vector(self.clone())])? .mul(&Matrix::from(&[arg.clone()])?) } diff --git a/src/main.rs b/src/main.rs index 03fe6a6..457eecc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,7 @@ const HELP_TEXT: &str = "\ ? => IntegerDivide ^ => Pow\n\ => Dup l => Log\n\ L => Ln e => *10^\n\ + _ => Explode vector or matrix\n\ => Swap => Edit\n\ uU => Undo/Redo ` => Constants\n\ r => Load Register R => Save Register\n\