Repository navigation
refactor(std): 同梱の core と std を x.f(a) のメソッド呼び出しで書き直す - #477
Merged
Merged
Conversation
同じ型の上で重ねる段は M.f(x, ...) と |> をやめてメソッドの連鎖にする.
別モジュールの関数や helper に渡す段は |> のまま残す.
- Ord.compare(a, b) と Eq.eq は a.compare(b) の形で呼ぶ.Float の compare
は Float.compare と Ord.compare が両方当たる(E0335)ので変えない
- 連鎖の最後の String.concat は .join("") にする
- doc コメントの例も同じ書き方にする
- std/http.emel の @deprecated の転送関数は,移った先を示すので修飾のまま
- 使わなくなった import Std.Cause を消す
lower のスナップショット 4 件は std の変化で local 番号がずれたので撮り直す.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
同梱の core と std(
crates/emela-core/lib)を,#467 のx.f(a)で書き直す.挙動は変えない.方針
reverse(fold(xs, ...))はxs.fold(...).reverse()に,Option.is_some(file_text(..))はfile_text(..).is_some()にした|>のまま残す変更
Ord.compare(a, b)とEq.eqはa.compare(b)の形で呼ぶString.concatは.join("")にした##の doc コメントの例も同じ書き方にしたimport Std.Cause(std/http.emel)を消した変えなかったもの
Float.max/Float.minのcompare(a, b).a.compare(b)だとFloat.compareとOrd.compareの両方に当たって E0335 になるnormal_headersの|>.fmt が行頭ドットの連鎖を 1 行にまとめて読みにくくなる確認
cargo nextest run --workspace: 1612 passed,1 skipped%78が%77になるなど)がずれただけcheckとtestが通る.emelでemela fmt --checkが通る