mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-15 22:33:05 -08:00
Added option to have custom download location
The location is automatically added to list of supported paths for caching
This commit is contained in:
committed by
John Wu
parent
7cd814d917
commit
e5118418b2
@@ -35,4 +35,11 @@ inline fun <In : InputStream, Out : OutputStream> withStreams(
|
||||
withBoth(reader, writer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <T, R> List<T>.firstMap(mapper: (T) -> R?): R {
|
||||
for (item: T in this) {
|
||||
return mapper(item) ?: continue
|
||||
}
|
||||
throw NoSuchElementException("Collection contains no element matching the predicate.")
|
||||
}
|
||||
Reference in New Issue
Block a user