-
-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(persistent cache): add make occasion (#8586)
feat: make occasion
- Loading branch information
1 parent
9e1205c
commit ec760c2
Showing
206 changed files
with
1,778 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use rkyv::{ | ||
rancor::{Fallible, Source}, | ||
ser::Writer, | ||
string::{ArchivedString, StringResolver}, | ||
with::{ArchiveWith, DeserializeWith, SerializeWith}, | ||
Place, | ||
}; | ||
use smol_str::SmolStr; | ||
|
||
use super::AsPreset; | ||
|
||
impl ArchiveWith<SmolStr> for AsPreset { | ||
type Archived = ArchivedString; | ||
type Resolver = StringResolver; | ||
|
||
#[inline] | ||
fn resolve_with(field: &SmolStr, resolver: Self::Resolver, out: Place<Self::Archived>) { | ||
ArchivedString::resolve_from_str(field.as_str(), resolver, out); | ||
} | ||
} | ||
|
||
impl<S> SerializeWith<SmolStr, S> for AsPreset | ||
where | ||
S: ?Sized + Fallible + Writer, | ||
S::Error: Source, | ||
{ | ||
#[inline] | ||
fn serialize_with(field: &SmolStr, serializer: &mut S) -> Result<Self::Resolver, S::Error> { | ||
ArchivedString::serialize_from_str(field.as_str(), serializer) | ||
} | ||
} | ||
|
||
impl<D> DeserializeWith<ArchivedString, SmolStr, D> for AsPreset | ||
where | ||
D: ?Sized + Fallible, | ||
{ | ||
#[inline] | ||
fn deserialize_with(field: &ArchivedString, _: &mut D) -> Result<SmolStr, D::Error> { | ||
Ok(SmolStr::from(field.as_str())) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
ec760c2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Benchmark detail: Open
ec760c2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Ran ecosystem CI: Open