Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Migrate away from elementAt #230

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
sdk: [3.0.0, dev]
sdk: [beta, dev]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.1.1

- Require Dart 3.3.0 or greater.
- Migrate `elementAt` use to `operator +`.

## 2.1.0

- Require Dart 3.0.0 or greater.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utf16.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension Utf16Pointer on Pointer<Utf16> {
final buffer = StringBuffer();
var i = 0;
while (true) {
final char = codeUnits.elementAt(i).value;
final char = (codeUnits + i).value;
if (char == 0) {
return buffer.toString();
}
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: ffi
version: 2.1.0
version: 2.1.1
description: Utilities for working with Foreign Function Interface (FFI) code.
repository: https://github.com/dart-lang/ffi

topics:
- interop
- ffi
- codegen
- interop
- ffi
- codegen

environment:
sdk: '>=3.0.0 <4.0.0'
sdk: '>=3.3.0-279.1.beta <4.0.0'

dev_dependencies:
test: ^1.21.2
Expand Down