Skip to content

Commit

Permalink
Use Self as return type for ctors
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Oct 7, 2021
1 parent 60ab048 commit 617b72b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/read/cfi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ impl<'a, 'ctx, R: Reader> UnwindTable<'a, 'ctx, R> {
bases: &'a BaseAddresses,
ctx: &'ctx mut UnwindContext<R>,
fde: &FrameDescriptionEntry<R>,
) -> Result<UnwindTable<'a, 'ctx, R>> {
) -> Result<Self> {
ctx.initialize(section, bases, fde.cie())?;
Ok(Self::new_for_fde(section, bases, ctx, fde))
}
Expand All @@ -1987,7 +1987,7 @@ impl<'a, 'ctx, R: Reader> UnwindTable<'a, 'ctx, R> {
bases: &'a BaseAddresses,
ctx: &'ctx mut UnwindContext<R>,
fde: &FrameDescriptionEntry<R>,
) -> UnwindTable<'a, 'ctx, R> {
) -> Self {
assert!(ctx.stack.len() >= 1);
UnwindTable {
code_alignment_factor: Wrapping(fde.cie().code_alignment_factor()),
Expand All @@ -2006,7 +2006,7 @@ impl<'a, 'ctx, R: Reader> UnwindTable<'a, 'ctx, R> {
bases: &'a BaseAddresses,
ctx: &'ctx mut UnwindContext<R>,
cie: &CommonInformationEntry<R>,
) -> UnwindTable<'a, 'ctx, R> {
) -> Self {
assert!(ctx.stack.len() >= 1);
UnwindTable {
code_alignment_factor: Wrapping(cie.code_alignment_factor()),
Expand Down

0 comments on commit 617b72b

Please sign in to comment.