zesterer/ariadne
1
33
Fork
You've already forked ariadne
4

Change : ToString to : Into<String>. #31

Open
fee1-dead wants to merge 1 commit from fee1-dead-contrib/change-bounds into main
pull from: fee1-dead-contrib/change-bounds
merge into: zesterer:main
zesterer:main
zesterer:optional-spans
zesterer:keep-compact-gutter
zesterer:location-only-layout
zesterer:woodpecker-ci
zesterer:suggestions
zesterer:ariadne2
zesterer:api-redesign
fee1-dead commented 2022年04月21日 08:28:50 +02:00 (Migrated from github.com)
Copy link

The rationale is that if the user already has a String, using
ToString will unnecessarily clone the String instead of assigning it
directly.

If you want, this can be done without a breaking change (i.e. keeping existing methods and adding new ones to support setting a string directly), but I'd argue that adds too much complexity to the API.

The rationale is that if the user already has a `String`, using `ToString` will unnecessarily clone the `String` instead of assigning it directly. If you want, this can be done without a breaking change (i.e. keeping existing methods and adding new ones to support setting a string directly), but I'd argue that adds too much complexity to the API.
ISSOtm commented 2024年05月23日 15:18:29 +02:00 (Migrated from github.com)
Copy link

Unfortunately, doing so would lose the ability to use any type that e.g. implements Display. I'm not sure that's great?

Unfortunately, doing so would lose the ability to use any type that e.g. implements `Display`. I'm not sure that's great?
fee1-dead commented 2024年05月23日 15:29:43 +02:00 (Migrated from github.com)
Copy link

Display should be explicit because it might be expensive.

`Display` should be explicit because it might be expensive.
This pull request has changes conflicting with the target branch.
  • CHANGELOG.md
  • Cargo.toml
  • src/lib.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fee1-dead-contrib/change-bounds:fee1-dead-contrib/change-bounds
git switch fee1-dead-contrib/change-bounds
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zesterer/ariadne!31
Reference in a new issue
zesterer/ariadne
No description provided.
Delete branch "fee1-dead-contrib/change-bounds"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?