nice, my code can parse leap-seconds.list and verify the checksum and many other sorts of cromulence and print out a new version of leap-seconds.list, and re-parse it, and get the same answer
1
2
bah conflicting implementations of trait `std::convert::TryFrom<&str>` for type `std::vec::Vec<leapsecs::LeapSec>`:
1
1
hmm and i can’t impl FromStr either because Vec<LeapSec> isn’t defined in my crate even though LeapSec _is_ defined in my crate
1
1
yeah i think i’ll just wrap the vec in a tuple struct because i’ll want to define a bunch of other methods on it
1
2
i’m currently refactoring my error handling and it’s kind of boring 😴
1
1
ooh looks like the code is working again it’ll be a fairly chunky commit tho
1
1
std::convert::TryFrom has an associated type called Error and std::str::FromStr has an associated type called Err πŸ¦€oopsπŸ¦€
1
2
hmm, i have both a binary and library target in this crate, and cargo runs all the tests for each target, so it runs the tests twice can’t see if there’s a cfg attribute for targets so i can disable them in the source tho i can turn off the lib tests in cargo.toml
2
2
i think i'm linking the binary target with the library in a strange way - i'm declaring the modules in both libΒ·rs and mainΒ·rs because i had some trouble using the lib in
1
Replying to @fanf
Yes, that's basically #include'ing the tests over again. You *should* be using the lib crate as any other client application would. In what way were you having trouble before?

May 4, 2021 Β· 6:40 PM UTC

1
Replying to @dsilverstone
can't remember now :-) it was some kind of name collision i'll revisit it when i have the functionality closer to working, still a lot of cleanup needed in many places
1
ok thanks :-) i think the main clue i missed was that i needed to use the lib as if it were another crate
1