Skip to content

Commit 3bd89ef

Browse files
committed
remove obsolete tuple extensions
1 parent 0607b93 commit 3bd89ef

3 files changed

Lines changed: 1 addition & 168 deletions

File tree

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 0.4.2
22
- generalize `AmOptional003` to switch expressions (#44)
33
- updated TUnit to 1.41.0
4+
- remove obsolete tuple operations (use `Join` #37)
45

56
## 0.4.1
67
- `OptionsMarshall` unsafe creation API
@@ -18,7 +19,6 @@
1819
- add `Map` and `Consume` for `Option<(T1, T2)>` and `Result<(T1, T2){, T}>` with a nicer delegate (for up to 5 elements in the tuple) (#37)
1920
- if this concept works more operations will follow in the 0.4 release cycle
2021
- remove obsolete `OptionsMarshall.TryGetValue` and `TryGetError` (use `Branch` #31)
21-
- mark tuple operations obsolete (use `Join` #37)
2222
- remove experimental `Consume` for `(Result<T, E>, Result<T, E>)` (use `Join` #37)
2323
- updated TUnit to 1.24.13
2424

src/Extensions/OptionTupleExtensions.cs

Lines changed: 0 additions & 110 deletions
This file was deleted.

src/Operations/Map.cs

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -97,60 +97,3 @@ public static RefOption<TResult> Map<TValue, TArg, TResult>(this Option<TValue>
9797
where TResult : struct, allows ref struct
9898
=> option._hasValue ? RefOption.Success(map(option._value, arg)) : default;
9999
}
100-
101-
partial class OptionTupleExtensions
102-
{
103-
[Obsolete("use a.Join(b).Map")]
104-
public static Option<R> Map<T1, T2, R>(this (Option<T1>, Option<T2>) options, Func<T1, T2, R> selector)
105-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value) : Option.Error<R>();
106-
107-
[Obsolete("use a.Join(b).Map")]
108-
public static Option<R> Map<T1, T2, R>(this (Option<T1>, Option<T2>) options, Func<T1, T2, Option<R>> selector)
109-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value) : default;
110-
111-
[Obsolete("use a.Join(b).Map")]
112-
public static Option<R> Map<T1, T2, TArg, R>(this (Option<T1>, Option<T2>) options, TArg arg, Func<T1, T2, TArg, R> selector)
113-
where TArg : allows ref struct
114-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value, arg) : Option.Error<R>();
115-
116-
[Obsolete("use a.Join(b).Map")]
117-
public static Option<R> Map<T1, T2, TArg, R>(this (Option<T1>, Option<T2>) options, TArg arg, Func<T1, T2, TArg, Option<R>> selector)
118-
where TArg : allows ref struct
119-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value, arg) : default;
120-
121-
[Obsolete("use a.Join(b).Map")]
122-
public static Result<R> Map<T1, T2, R>(this (Result<T1>, Result<T2>) options, Func<T1, T2, R> selector)
123-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value) : Result.CombineErrors(options.Item1, options.Item2)._error;
124-
125-
[Obsolete("use a.Join(b).Map")]
126-
public static Result<R> Map<T1, T2, R>(this (Result<T1>, Result<T2>) options, Func<T1, T2, Result<R>> selector)
127-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value) : Result.CombineErrors(options.Item1, options.Item2)._error;
128-
129-
[Obsolete("use a.Join(b).Map")]
130-
public static Result<R> Map<T1, T2, TArg, R>(this (Result<T1>, Result<T2>) options, TArg arg, Func<T1, T2, TArg, R> selector)
131-
where TArg : allows ref struct
132-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value, arg) : Result.CombineErrors(options.Item1, options.Item2)._error;
133-
134-
[Obsolete("use a.Join(b).Map")]
135-
public static Result<R> Map<T1, T2, TArg, R>(this (Result<T1>, Result<T2>) options, TArg arg, Func<T1, T2, TArg, Result<R>> selector)
136-
where TArg : allows ref struct
137-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value, arg) : Result.CombineErrors(options.Item1, options.Item2)._error;
138-
139-
[Obsolete("use a.Join(b).Map")]
140-
public static Result<R, E> Map<T1, T2, E, R>(this (Result<T1, E>, Result<T2, E>) options, Func<T1, T2, R> selector, Func<E, E, E> errorCombiner)
141-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value) : Result.CombineErrors(options.Item1, options.Item2, errorCombiner)._error;
142-
143-
[Obsolete("use a.Join(b).Map")]
144-
public static Result<R, E> Map<T1, T2, E, R>(this (Result<T1, E>, Result<T2, E>) options, Func<T1, T2, Result<R, E>> selector, Func<E, E, E> errorCombiner)
145-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value) : Result.CombineErrors(options.Item1, options.Item2, errorCombiner)._error;
146-
147-
[Obsolete("use a.Join(b).Map")]
148-
public static Result<R, E> Map<T1, T2, E, TArg, R>(this (Result<T1, E>, Result<T2, E>) options, TArg arg, Func<T1, T2, TArg, R> selector, Func<E, E, TArg, E> errorCombiner)
149-
where TArg : allows ref struct
150-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value, arg) : Result.CombineErrors(options.Item1, options.Item2, arg, errorCombiner)._error;
151-
152-
[Obsolete("use a.Join(b).Map")]
153-
public static Result<R, E> Map<T1, T2, E, TArg, R>(this (Result<T1, E>, Result<T2, E>) options, TArg arg, Func<T1, T2, TArg, Result<R, E>> selector, Func<E, E, TArg, E> errorCombiner)
154-
where TArg : allows ref struct
155-
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value, arg) : Result.CombineErrors(options.Item1, options.Item2, arg, errorCombiner)._error;
156-
}

0 commit comments

Comments
 (0)