Skip to content

Commit

Permalink
WriteBuffer: remove unused StringEncoder method
Browse files Browse the repository at this point in the history
  • Loading branch information
Douile committed Oct 30, 2023
1 parent a2c4324 commit 9d2fabb
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/wbuffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,6 @@ pub trait StringEncoder<B: ByteOrder> {
/// be an estimate: if unknown return None.
fn bytes_required(_string: &str) -> Option<usize> { None }

fn encode_string_to_buffer(string: &str) -> GDResult<WriteBuffer<B>> {
let mut buffer = if let Some(capacity) = Self::bytes_required(string) {
WriteBuffer::with_capacity(capacity)
} else {
WriteBuffer::default()
};

Self::encode_string(&mut buffer, string)?;

Ok(buffer)
}

/// Encode a string.
fn encode_string(buffer: &mut WriteBuffer<B>, string: &str) -> GDResult<()>;
}
Expand Down

0 comments on commit 9d2fabb

Please sign in to comment.