Skip to content

Commit 6f07403

Browse files
committed
dart format (via cli)
1 parent c3f5e24 commit 6f07403

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

format.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
cd "$(realpath "$(dirname "$0")")"
3+
find . -name '*.dart' -not -name '*.ffigen.*' -print0 | xargs -0 -- dart format

lib/src/ensemble_llama_base.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ class Llama {
9292

9393
_controlPort.send(ctl);
9494
final resp = (await _response.firstWhere(
95-
(e) => e is LoadModelResp && e.id == ctl.id))
96-
as LoadModelResp;
95+
(e) => e is LoadModelResp && e.id == ctl.id)) as LoadModelResp;
9796

9897
progressListener.cancel();
9998
resp.throwIfErr();
@@ -109,9 +108,8 @@ class Llama {
109108
Future<Context> newContext(Model model, ContextParams params) async {
110109
final ctl = NewContextCtl(model, params);
111110
_controlPort.send(ctl);
112-
final resp =
113-
await _response.firstWhere((e) => e is NewContextResp && e.id == ctl.id)
114-
as NewContextResp
111+
final resp = await _response.firstWhere(
112+
(e) => e is NewContextResp && e.id == ctl.id) as NewContextResp
115113
..throwIfErr();
116114
return resp.ctx!;
117115
}

lib/src/llama_cpp_isolate_wrapper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void _onControl(ControlMessage ctl) {
222222
_response.send(ctl.done());
223223

224224
case LoadModelCtl():
225-
final Set<Pointer> allocs = {};
225+
final Set<Pointer> allocs = {};
226226
final params = libllama.llama_context_default_params()
227227
..setSimpleFrom(ctl.params);
228228

0 commit comments

Comments
 (0)