bramp / bramp/rustdns

Consider using Rc<str> and other copy-friendly types when returning DNS data to the user.

Open
#6 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
24
Forks
12
Avg merge
15h 7m
Merged PRs (30d)
11

Description

This library is really cool, thanks for making this.

When rendering the results in my app, I found that I `clone()` `String` a lot. Since the results returned are not meant to be mutated by the user, it would be nice if those copies were just an increment of the reference count and not actual data copies.

I am not sure how to best approach this, however, because some users may wish to use an `Arc` instead. My current usecase is making `dig` in the browser with WASM and I do not need to use `Arc`s just yet. But may a type alias and a feature flag to turn that type alias into an `Arc` is the way to go.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.