summaryrefslogtreecommitdiff
path: root/src/diagrams.rs
AgeCommit message (Collapse)AuthorFilesLines
30 hoursrefactor: potentially avoid re-allocations by using clone_fromLars Wirzenius1-3/+3
clippy found three instances where the new clone_from method could be used. https://rust-lang.github.io/rust-clippy/master/index.html#/assigning_clones While it is unlikely to have any real effect for our use, it seems worth making this change to follow the evolving best practices for Rust code. Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
2023-04-08chore(src/diagrams.rs): drop pointless commentLars Wirzenius1-2/+0
This was probably a copy-paste error. Sponsored-by: author
2022-09-03refactor: add a type for SVG imagesLars Wirzenius1-7/+33
This allows us to not use a generic byte vector, and slightly lessens the chance of mistakes. Also, it strongly encodes what we need to know about and do with SVG images. Sponsored-by: author
2022-05-14(cli): Change from structopt to clap3-deriveDaniel Silverstone1-7/+6
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2022-05-06refactor! split SubplotError::IoError into more specific errorsLars Wirzenius1-8/+21
Replace SubplotError::IoError with ::Spawn, ::WriteToChild, ::WaitForChild, ::ReadFile, ::CreateFile, ::Writefile. IoError was a catchall error and as such, so generic that it didn't help the user to figure out what actually is wrong. For example, there was no indication what operation was attempted or on what file. The new error variants are specific. Sponsored-by: author
2022-05-05refactor: drop the subplot::Result type aliasLars Wirzenius1-5/+5
Replace subplot::Result<T> with Result<T, SubplotError>. I find this now to be clearer, as I don't need to remind myself which Result is being used where. This should not be a breaking change. Sponsored-by: author
2022-04-26refactor: use "diagram" instead of "graph"Lars Wirzenius1-0/+224
Change everywhere to use the word "diagram" instead of "graph. Diagram seems like the better word. It's mostly used in comments and documentation, but there was one filename and one trait name that needed changing. I used "rg -iw graph" and "find -iname '*graph*'" to find everywhere that needed changing. Sponsored-by: author