Commit old changes

This commit is contained in:
Austen Adler 2022-12-25 18:56:01 -05:00
parent 6bf83540fb
commit 4379cb66a9
6 changed files with 10 additions and 5 deletions

View File

@ -13,13 +13,18 @@ deps:
rust-builder: rust-builder:
RUN rustup target add x86_64-unknown-linux-musl RUN rustup target add x86_64-unknown-linux-musl
RUN rustup target add x86_64-pc-windows-gnu 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 i686-unknown-linux-musl
RUN rustup target add aarch64-unknown-linux-musl RUN rustup target add aarch64-unknown-linux-musl
RUN rustup target add arm-unknown-linux-musleabi RUN rustup target add arm-unknown-linux-musleabi
RUN rustup target add armv7-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 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 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=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=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=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

View File

@ -3,7 +3,7 @@
mod matrix; mod matrix;
mod number; mod number;
mod vector; mod vector;
use super::errors::{CalculatorError, CalculatorResult}; use super::errors::CalculatorResult;
use crate::calc::{types::CalculatorAngleMode, CalculatorDisplayMode}; use crate::calc::{types::CalculatorAngleMode, CalculatorDisplayMode};
pub use matrix::{Matrix, MatrixDimensions}; pub use matrix::{Matrix, MatrixDimensions};
pub use number::Number; pub use number::Number;

View File

@ -145,7 +145,6 @@ impl Matrix {
impl CalculatorEntry for Matrix { impl CalculatorEntry for Matrix {
fn to_editable_string(&self) -> CalculatorResult<String> { fn to_editable_string(&self) -> CalculatorResult<String> {
// TODO: Eventualy we can parse and edit a matrix as a string
Err(CalculatorError::TypeMismatch) Err(CalculatorError::TypeMismatch)
} }
fn is_valid(&self) -> bool { fn is_valid(&self) -> bool {

View File

@ -1,4 +1,4 @@
use super::{Entry, Matrix, Vector, VectorDirection}; use super::{Entry, Matrix, Vector};
use crate::{ use crate::{
calc::{ calc::{
errors::{CalculatorError, CalculatorResult}, errors::{CalculatorError, CalculatorResult},

View File

@ -154,7 +154,6 @@ impl CalculatorEntry for Vector {
}) })
} }
(VectorDirection::Column, VectorDirection::Row) => { (VectorDirection::Column, VectorDirection::Row) => {
// TODO: Do we need to clone?
Matrix::from(&[Entry::Vector(self.clone())])? Matrix::from(&[Entry::Vector(self.clone())])?
.mul(&Matrix::from(&[arg.clone()])?) .mul(&Matrix::from(&[arg.clone()])?)
} }

View File

@ -21,6 +21,7 @@ const HELP_TEXT: &str = "\
? => IntegerDivide ^ => Pow\n\ ? => IntegerDivide ^ => Pow\n\
<ret> => Dup l => Log\n\ <ret> => Dup l => Log\n\
L => Ln e => *10^\n\ L => Ln e => *10^\n\
_ => Explode vector or matrix\n\
<right> => Swap <down> => Edit\n\ <right> => Swap <down> => Edit\n\
uU => Undo/Redo ` => Constants\n\ uU => Undo/Redo ` => Constants\n\
r => Load Register R => Save Register\n\ r => Load Register R => Save Register\n\