Skip to content

drop manual StringBuf delete, use into-string #69

Description

@hellerve

strbuf 0.3.0 is out. Since 0.2.1 the compiler deletes buffers for us (implements delete), and 0.3.0 adds into-string, which consumes a buffer and hands its allocation to the returned String without copying.

One site: web.carp:600-601, the chunked-response builder, where to-string is followed by StringBuf.delete sb. That becomes (StringBuf.into-string sb).

No pin to bump here, since StringBuf arrives transitively through http. The version this repo builds against follows from bumping the http pin at web.carp:37.

Nothing breaks if this waits: manual delete is still an ownership transfer and does not double free.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions