mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>
We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace! This was a slightly tedious refactoring that took a long time, so it's not unlikely that some bugs crept in. Nevertheless, it does pass basic functionality testing, and it's just real nice to finally see the same pattern in all contexts. :^)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
namespace Kernel::Memory {
|
||||
|
||||
KResultOr<NonnullRefPtr<SharedInodeVMObject>> SharedInodeVMObject::try_create_with_inode(Inode& inode)
|
||||
ErrorOr<NonnullRefPtr<SharedInodeVMObject>> SharedInodeVMObject::try_create_with_inode(Inode& inode)
|
||||
{
|
||||
size_t size = inode.size();
|
||||
if (auto shared_vmobject = inode.shared_vmobject())
|
||||
@@ -19,7 +19,7 @@ KResultOr<NonnullRefPtr<SharedInodeVMObject>> SharedInodeVMObject::try_create_wi
|
||||
return vmobject;
|
||||
}
|
||||
|
||||
KResultOr<NonnullRefPtr<VMObject>> SharedInodeVMObject::try_clone()
|
||||
ErrorOr<NonnullRefPtr<VMObject>> SharedInodeVMObject::try_clone()
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem<VMObject>(new (nothrow) SharedInodeVMObject(*this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user