Skip to content

Commit

Permalink
r/send/sent
Browse files Browse the repository at this point in the history
  • Loading branch information
heeckhau committed Mar 4, 2024
1 parent fb7934c commit 9b741fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/redacted_bytes_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ use yew::prelude::*;

#[derive(Clone, PartialEq)]
pub enum Direction {
Send,
Sent,
Received,
}

impl fmt::Display for Direction {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Direction::Send => write!(f, "send"),
Direction::Sent => write!(f, "sent"),
Direction::Received => write!(f, "received"),
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/view_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub fn ViewFile(props: &Props) -> Html {
sent.set_redacted(b'X');
recv.set_redacted(b'X');

let redacted_ranges_send: Vec<Range<usize>> =
let redacted_ranges_sent: Vec<Range<usize>> =
sent.redacted().clone().iter_ranges().collect();
let redacted_ranges_recv: Vec<Range<usize>> =
recv.redacted().clone().iter_ranges().collect();
Expand All @@ -124,7 +124,7 @@ pub fn ViewFile(props: &Props) -> Html {
</div>
</div>

<RedactedBytesComponent direction={Direction::Send} redacted_char={REDACTED_CHAR} bytes={sent.data().to_vec()} redacted_ranges={redacted_ranges_send} />
<RedactedBytesComponent direction={Direction::Sent} redacted_char={REDACTED_CHAR} bytes={sent.data().to_vec()} redacted_ranges={redacted_ranges_sent} />

<ContentIFrame bytes={recv.data().to_vec()} />

Expand Down

0 comments on commit 9b741fa

Please sign in to comment.