Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: using &str directly instead of S: Borrow<str>. #111

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

filippodebortoli
Copy link
Collaborator

  • numbers of clone()s decreased
  • number of explicit borrow() calls decreased
  • we use & a bit more often
  • all public methods generating named individuals have a simpler signature

@filippodebortoli filippodebortoli added API This concerns horned as a library refactor labels Jun 20, 2024
@filippodebortoli filippodebortoli force-pushed the refactor/str-instead-of-borrow-s branch from 4ff3322 to 44283dd Compare June 20, 2024 09:49
@filippodebortoli filippodebortoli force-pushed the refactor/str-instead-of-borrow-s branch from 44283dd to e987107 Compare June 20, 2024 10:50
@phillord
Copy link
Owner

phillord commented Jul 3, 2024

I am not convinced by this one. We do simplify some of the API by moving from a generic type to a concrete one, but that increases the complexity in many other areas (lots of "&").

ForIRI is now Deref<str> so it feels like many of the borrow and clone could go anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API This concerns horned as a library refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants