Skip to content

Commit

Permalink
Avoid public Deref commitment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhoo committed Feb 18, 2024
1 parent 48e9a57 commit 0bd2ab0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/proto/single/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,6 @@ impl FaktoryCommand for Push {

pub struct PushBulk(Vec<Job>);

impl Deref for PushBulk {
type Target = Vec<Job>;
fn deref(&self) -> &Self::Target {
&self.0
}
}

impl From<Vec<Job>> for PushBulk {
fn from(jobs: Vec<Job>) -> Self {
PushBulk(jobs)
Expand All @@ -262,7 +255,7 @@ impl From<Vec<Job>> for PushBulk {
impl FaktoryCommand for PushBulk {
fn issue<W: Write>(&self, w: &mut W) -> Result<(), Error> {
w.write_all(b"PUSHB ")?;
serde_json::to_writer(&mut *w, &**self).map_err(Error::Serialization)?;
serde_json::to_writer(&mut *w, &self.0).map_err(Error::Serialization)?;
Ok(w.write_all(b"\r\n")?)
}
}
Expand Down

0 comments on commit 0bd2ab0

Please sign in to comment.