Skip to content

Commit

Permalink
Merge pull request #1 from guha-rahul/encode_param_update
Browse files Browse the repository at this point in the history
feat: u8 to const u8
  • Loading branch information
g11tech authored Jan 16, 2025
2 parents 13fe068 + d1fd3d7 commit beb2a56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snappy.zig
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ fn encodeBlock(dst: []u8, src: []u8) usize {
}

/// Encode returns the encoded form of the source input. The returned slice must be freed.
pub fn encode(allocator: Allocator, src: []u8) ![]u8 {
pub fn encode(allocator: Allocator, src: []const u8) ![]u8 {
var mutSrc = src;
const encodedLen = maxEncodedLen(mutSrc.len);
if (encodedLen < 0) {
Expand Down

0 comments on commit beb2a56

Please sign in to comment.