Skip to content

Commit 30b45fb

Browse files
authored
chore: release v0.15.0 (#266)
* chore: release v0.15.0 * add more tips
1 parent 4d1f355 commit 30b45fb

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

v015-MIGRATION.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212

1313
## Migration tips for v0.15
1414

15-
- If your use case supports it, prefer `append` to append a Component to a
16-
Multiaddr rather than using `Encapsulate`. It's much faster as it does not do
17-
a defensive copy.
15+
- If appending a `*Component` to a `Multiaddr`, prefer the
16+
`Multiaddr.AppendComponent` method as it will perform a nil pointer check on
17+
the `*Component` before appending. If you know a `*Component` is not nil, you
18+
may use `append` normally.
19+
- the `Multiaddr` type is simply a `[]Component`.
20+
- You can use `append` when you have a `Component`.
21+
- You can use `for range` loops.
22+
- If your use case supports it, prefer `append` or `AppendComponent` to append a
23+
Component to a Multiaddr rather than using `Encapsulate` or `Join`. It's much
24+
faster as it does not do a defensive copy.
25+
- Likewise, to join two Multiaddrs, `append` will perform better than
26+
`Encapsulate` or `Join`.

version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "v0.14.0"
2+
"version": "v0.15.0"
33
}

0 commit comments

Comments
 (0)