Skip to content

Commit

Permalink
refactor: ♻️ remove unnecessary @immutable annotation on extension …
Browse files Browse the repository at this point in the history
…types

Signed-off-by: Albert Mañosa <26429103+albertms10@users.noreply.github.com>
  • Loading branch information
albertms10 committed Mar 31, 2024
1 parent f4b67e3 commit 162860e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions lib/src/interval/size.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import 'package:collection/collection.dart' show IterableExtension;
import 'package:meta/meta.dart' show immutable, redeclare;
import 'package:meta/meta.dart' show redeclare;
import 'package:music_notes/utils.dart';

import '../music.dart';
import 'interval.dart';
import 'quality.dart';

/// An [Interval] size.
@immutable
extension type const Size._(int size) implements int {
/// Creates a new [Size] from [size].
const Size(this.size) : assert(size != 0, 'Value must be non-zero.');
Expand Down
3 changes: 0 additions & 3 deletions lib/src/note/frequency.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:meta/meta.dart' show immutable;

import '../tuning/equal_temperament.dart';
import '../tuning/ratio.dart';
import '../tuning/temperature.dart';
Expand All @@ -15,7 +13,6 @@ import 'pitch_class.dart';
/// See also:
/// * [Pitch].
/// * [ClosestPitch].
@immutable
extension type const Frequency._(num hertz) implements num {
/// Creates a new [Frequency] instance from [hertz].
const Frequency(this.hertz) : assert(hertz >= 0, 'Hertz must be positive.');
Expand Down
3 changes: 1 addition & 2 deletions lib/src/tuning/cent.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:math' as math;

import 'package:meta/meta.dart' show immutable, redeclare;
import 'package:meta/meta.dart' show redeclare;

import '../interval/interval.dart';
import '../music.dart';
Expand All @@ -14,7 +14,6 @@ import 'tuning_system.dart';
/// See also:
/// * [TuningSystem].
/// * [Ratio].
@immutable
extension type const Cent(num value) implements num {
/// The unit symbol for [Cent].
static const unitSymbol = '¢';
Expand Down
3 changes: 0 additions & 3 deletions lib/src/tuning/ratio.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'dart:math' as math;

import 'package:meta/meta.dart' show immutable;

import 'cent.dart';
import 'tuning_system.dart';

Expand All @@ -11,7 +9,6 @@ import 'tuning_system.dart';
/// See also:
/// * [TuningSystem].
/// * [Cent].
@immutable
extension type const Ratio._(num value) implements num {
/// Creates a new [Ratio] from [value].
const Ratio(this.value)
Expand Down

0 comments on commit 162860e

Please sign in to comment.