mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-01 17:45:35 +00:00
rename constructors
This commit is contained in:
parent
5360c6bf19
commit
8feab6b93b
4 changed files with 9 additions and 8 deletions
|
|
@ -6,7 +6,7 @@ pub struct Header(Vec<u8>);
|
|||
impl Header {
|
||||
// Constructors
|
||||
|
||||
pub fn parse(buffer: &[u8]) -> Result<Self, Error> {
|
||||
pub fn from_utf8(buffer: &[u8]) -> Result<Self, Error> {
|
||||
if !buffer.starts_with(super::CODE) {
|
||||
return Err(Error::Code);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue