aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-10-14Distribute tests closer to the code they testRichard Walters
2020-10-14Fix new clippy warningsRichard Walters
* Suppress clippy::option_if_let_else in parse_host_port::State::next_percent_encoded_character because the warning recommends Option::map_or which we cannot use because it leads to using a moved value. * Use matches! instead in uri::Uri::is_path_absolute as recommended. * Use and_then instead of if let/else in uri::Uri::port as recommended; note we need to replace the & with as_ref for self.authority. * In uri::Uri::resolve, replace the large if let/else with map_or as recommended, although it's not clear if it makes it any easier to read. ¯\_(ツ)_/¯
2020-10-14Preparation for publishing on crates.ioRichard Walters
* Rename crate to "rhymuri" since "uri" is taken; FeelsBadMan * Bump crate version to 1.0.0. * Add categories, keywords, and repository metadata. * Update README with links to crates.io and documentation. * Add license reference in README.
2020-10-13Fix issue with namingRichard Walters
Use "to_" prefix instead of "as_" for functions which create values (expensive). See: https://rust-lang.github.io/api-guidelines/naming.html#ad-hoc-conversions-follow-as_-to_-into_-conventions-c-conv
2020-10-13Add test vector to test Error::TooManyDigitsRichard Walters
2020-10-13Make the Context and Error types publicRichard Walters
2020-10-13Add documentation (Rust)Richard Walters
2020-10-13Consolidate crate-wide warning attributes to crate level (lib.rs)Richard Walters
2020-10-13Fix issues using libraryRichard Walters
* Don't pull in all of the uri module as public. * To expose types publically, use "pub use" at crate level.
2020-10-13No need to use turbofish for collect in encode_elementRichard Walters
2020-10-13Reuse DIGIT character set in HEXDIGRichard Walters
2020-10-13Remove unnecessary allowRichard Walters
2020-10-13Sort functions by alphabetical orderRichard Walters
2020-10-13Move Uri to its own moduleRichard Walters
2020-10-13Move authority and codec functions to their own modulesRichard Walters
2020-10-13Rust refactoringRichard Walters
* Move Context, Error, and character classes to their own modules. * Move host/port parsing and IP address validation to their own modules, and break the code up into different functions to process their state machines.
2020-10-12Fix bugs in validating numbers of IPv6 address groupsRichard Walters
2020-10-12Replace lazy_static! with once_cell::sync::LazyRichard Walters
2020-10-12Remove unused staticsRichard Walters
2020-10-12Rust refactoringRichard Walters
* Move decode_element out of Uri impl. * Rewrite encode_element to be more functional. * Add test for empty port number.
2020-10-12Rust refactoringRichard Walters
* Dismiss todos. * Remove unused parens for multi-line ifs. * Explain at_directory_level variable in Uri::normalize_path.
2020-10-12Add ..._as_string methods to Uri for convenienceRichard Walters
2020-10-12Clean up tests in RustRichard Walters
* Use Uri::path_as_string() when convenient. * Remove unnecessary clones and temporary variables.
2020-10-12Rust refactoringRichard Walters
* Use Into trait for setters to accept input. * Make input to Uri::check_scheme more flexible. * Rewrite Uri::set_path_from_str to use match so as not to shadow path, and no need for 'a lifetime. * Rewrite Uri::set_scheme to use match.
2020-10-12Remove unnecessary blank lineRichard Walters
2020-10-12Make functions accepting references more generic using AsRefRichard Walters
2020-10-12Clean up Uri::hostRichard Walters
2020-10-12Use Into::into in place of closuresRichard Walters
2020-10-12Make Uri::decode_element more flexible in what it takes as an argumentRichard Walters
2020-10-12Clean up Uri::parse_path and make it functionalRichard Walters
2020-10-12Refactoring: collect path functionallyRichard Walters
2020-10-12Make Uri::check_scheme more functionalRichard Walters
2020-10-12clean up todosRichard Walters
2020-10-12Make Uri::decode_element more functionalRichard Walters
2020-10-11Fix normalize test and corner case bug with path_as_stringRichard Walters
2020-10-10Remove explicit test vector array length declarationsRichard Walters
This method was proposed by @Serayen.
2020-10-09Use named_tuple! to simplify test vector declarationsRichard Walters
2020-10-09Use thiserror to implement Error/Display/From traits for usRichard Walters
2020-10-09Minor whitespace/comment cleanupRichard Walters
2020-10-09Make Rust errors a bit more expressiveRichard Walters
2020-10-09Rust implementation refactoringRichard Walters
* Use more expressive errors, especially in address parsing. * Use match in some cases where we were using if/else. * Split IPv6 address parsing tests up between good/base cases.
2020-10-09Implement std::error::Error for custom error typesRichard Walters
2020-10-09Remove unnecessary check in IPv6 parsingRichard Walters
It's not possible to have encountered a double-colon when in the COLON_BUT_NO_GROUPS_YET state.
2020-10-09Slight improvement to name of a state in IPv6 address parsingRichard Walters
AFTER_COLON_EXPECT_GROUP_OR_IPV4 -> AFTER_DOUBLE_COLON
2020-10-09Fix bug in parsing IPv6 addressesRichard Walters
Fix bug where an IPv6 address ending in a double-colon was not considered valid (it was being considered as truncated).
2020-10-09Fix bug in IPv6 address parsingRichard Walters
Fix bug where IPv6 address ending in a group with only digits followed by a double-colon would not get parsed correctly
2020-10-09Dismiss some todosRichard Walters
2020-10-07(Rust) Uri::is_path_absolute: match against whole path, not first segmentRichard Walters
2020-10-07(Rust) combine match with if/else in Uri::validate_ipv4_addressRichard Walters
2020-10-07(Rust) dismiss some todosRichard Walters