Skip to content

Commit d768ca0

Browse files
committed
[wip] Implement Ref cast methods
1 parent 2c8ef74 commit d768ca0

File tree

2 files changed

+367
-64
lines changed

2 files changed

+367
-64
lines changed

src/error.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,6 @@ impl<Src, Dst: ?Sized> SizeError<Src, Dst> {
428428
self.src
429429
}
430430

431-
/// Sets the source value associated with the conversion error.
432-
pub(crate) fn with_src<NewSrc>(self, new_src: NewSrc) -> SizeError<NewSrc, Dst> {
433-
SizeError { src: new_src, dst: SendSyncPhantomData::default() }
434-
}
435-
436431
/// Maps the source value associated with the conversion error.
437432
///
438433
/// This can help mitigate [issues with `Send`, `Sync` and `'static`
@@ -683,15 +678,6 @@ impl<Src, Dst: ?Sized> CastError<Src, Dst> {
683678
}
684679
}
685680

686-
/// Sets the source value associated with the conversion error.
687-
pub(crate) fn with_src<NewSrc>(self, new_src: NewSrc) -> CastError<NewSrc, Dst> {
688-
match self {
689-
Self::Alignment(e) => CastError::Alignment(e.with_src(new_src)),
690-
Self::Size(e) => CastError::Size(e.with_src(new_src)),
691-
Self::Validity(i) => match i {},
692-
}
693-
}
694-
695681
/// Maps the source value associated with the conversion error.
696682
///
697683
/// This can help mitigate [issues with `Send`, `Sync` and `'static`

0 commit comments

Comments
 (0)